commit 5fabd0233d3bcec1a7b219978ff2d7758fc859f6
parent c43e905729d07d7ffd297a7d29e10173d9c50633
Author: vx-clutch <[email protected]>
Date: Sun, 28 Dec 2025 16:38:40 -0500
fix: print usage to err instead of out
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/main.go b/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")