add initial out command

This commit is contained in:
Chris Brown
2015-01-31 23:04:49 +00:00
parent 6780afd2ca
commit a36b7368e7
6 changed files with 289 additions and 0 deletions

17
fmt.go Normal file
View File

@@ -0,0 +1,17 @@
package resource
import (
"fmt"
"os"
"github.com/mitchellh/colorstring"
)
func Fatal(doing string, err error) {
Sayf(colorstring.Color("[red]error %s: %s\n"), doing, err)
os.Exit(1)
}
func Sayf(message string, args ...interface{}) {
fmt.Fprintf(os.Stderr, message, args...)
}