Log usage instructions to stderr instead of stdout

This commit is contained in:
Alex Yatskov 2015-05-18 11:11:25 +09:00
parent 785dfc95ff
commit 7dc5c10f18

View File

@ -70,9 +70,9 @@ func parse(filename string) (*config, error) {
} }
func usage() { func usage() {
fmt.Printf("Usage: %s [options] conf [src]\n", os.Args[0]) fmt.Fprintf(os.Stderr, "Usage: %s [options] conf [src]\n", os.Args[0])
fmt.Print("http://foosoft.net/projects/homemaker/\n\n") fmt.Fprintf(os.Stderr, "http://foosoft.net/projects/homemaker/\n\n")
fmt.Print("Parameters:\n") fmt.Fprintf(os.Stderr, "Parameters:\n")
flag.PrintDefaults() flag.PrintDefaults()
} }