All status messages go to Stderr. Fixes #104
diff --git a/cmd/msg.go b/cmd/msg.go index 861db75..56b6942 100644 --- a/cmd/msg.go +++ b/cmd/msg.go
@@ -33,7 +33,7 @@ if Quiet { return } - fmt.Print(Color(Green, "[INFO] ")) + fmt.Fprint(os.Stderr, Color(Green, "[INFO] ")) Msg(msg, args...) } @@ -42,7 +42,7 @@ if Quiet || !IsDebugging { return } - fmt.Print("[DEBUG] ") + fmt.Fprint(os.Stderr, "[DEBUG] ") Msg(msg, args...) } @@ -77,14 +77,14 @@ // varying types. func Msg(msg string, args ...interface{}) { if len(args) == 0 { - fmt.Print(msg) + fmt.Fprint(os.Stderr, msg) return } - fmt.Printf(msg, args...) + fmt.Fprintf(os.Stderr, msg, args...) // Get rid of the annoying fact that messages need \n at the end, but do // it in a backward compatible way. if !strings.HasSuffix(msg, "\n") { - fmt.Println() + fmt.Fprintln(os.Stderr) } }