package main

import (
	"fmt"
	"os"
)

func pr(f string, v ...interface{}) {
	fmt.Printf(f+"\n", v...)
}

func prn(f string, v ...interface{}) {
	fmt.Printf(f, v...)
}

func exists(path string) bool {
	_, err := os.Stat(path)
	return err == nil
}

// createdir is used when the existence of a directory is absolutely required.
func createdir(dir string) string {
	if !exists(dir) {
		err := os.MkdirAll(dir, 0700)
		if err != nil {
			pr("Fatal: Couldn't create directory %s", dir)
			os.Exit(2)
		}
	}
	return dir
}

package main

import (
	"fmt"
	"os"
)

func pr(f string, v ...interface{}) {
	fmt.Printf(f+"\n", v...)
}

func exists(path string) bool {
	_, err := os.Stat(path)
	return err == nil
}

// createdir is used when the existence of a directory is absolutely required.
func createdir(dir string) string {
	if !exists(dir) {
		err := os.MkdirAll(dir, 0700)
		if err != nil {
			pr("Fatal: Couldn't create directory %s", dir)
			os.Exit(2)
		}
	}
	return dir
}

--- 
+++ 
@@ -7,6 +7,10 @@
 
 func pr(f string, v ...interface{}) {
 	fmt.Printf(f+"\n", v...)
+}
+
+func prn(f string, v ...interface{}) {
+	fmt.Printf(f, v...)
 }
 
 func exists(path string) bool {
Add prn() for no-newline printouts.
