fix: print usage to err instead of out
This commit is contained in:
12
main.go
12
main.go
@@ -34,13 +34,13 @@ func init() {
|
||||
func main() {
|
||||
flag.Usage = func() {
|
||||
fmt.Fprintf(flag.CommandLine.Output(), "Usage: %s [options] <command> <project_dir>\n", os.Args[0])
|
||||
fmt.Println("Commands:")
|
||||
fmt.Println(" new <project_dir> Create a new project")
|
||||
fmt.Println(" doc Open documentation")
|
||||
fmt.Println(" run <project_dir> Start the server")
|
||||
fmt.Println("Options:")
|
||||
fmt.Fprintf(os.Stderr, "Commands:")
|
||||
fmt.Fprintf(os.Stderr, " new <project_dir> Create a new project")
|
||||
fmt.Fprintf(os.Stderr, " doc Open documentation")
|
||||
fmt.Fprintf(os.Stderr, " run <project_dir> Start the server")
|
||||
fmt.Fprintf(os.Stderr, "Options:")
|
||||
flag.PrintDefaults()
|
||||
fmt.Println("For bug reports, contact a developer and describe the issue. Provide the output of the `-V1` flag.")
|
||||
fmt.Fprintf(os.Stderr, "For bug reports, contact a developer and describe the issue. Provide the output of the `-V1` flag.")
|
||||
}
|
||||
|
||||
showVersion := flag.Bool("version", false, "Show version and exit")
|
||||
|
||||
Reference in New Issue
Block a user