From 235fba500780028d99a11e129b929f69d30ef008 Mon Sep 17 00:00:00 2001 From: handlerug Date: Sat, 19 Jun 2021 18:38:13 +0700 Subject: [PATCH] Fix Usage message --- flag.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/flag.go b/flag.go index e420b29..1ddb3e8 100644 --- a/flag.go +++ b/flag.go @@ -4,10 +4,11 @@ import ( _ "embed" "flag" "fmt" - "github.com/bouncepaw/mycorrhiza/cfg" "log" "os" "path/filepath" + + "github.com/bouncepaw/mycorrhiza/cfg" ) // CLI options are read and parsed here. @@ -25,14 +26,11 @@ func init() { // printHelp prints the help message. func printHelp() { - _, err := fmt.Fprintf( + fmt.Fprintf( flag.CommandLine.Output(), - "Usage of %s:\n", + "Usage: %s WIKI_PATH\n", os.Args[0], ) - if err != nil { - log.Fatal(err) - } flag.PrintDefaults() }