cmd/hydroxide: override flag.Usage with our usage string

This commit is contained in:
Simon Ser 2021-02-23 18:39:59 +01:00
parent edc8a078b9
commit b812444ff8
1 changed files with 5 additions and 1 deletions

View File

@ -166,6 +166,10 @@ func main() {
importMessagesCmd := flag.NewFlagSet("import-messages", flag.ExitOnError)
exportMessagesCmd := flag.NewFlagSet("export-messages", flag.ExitOnError)
flag.Usage = func() {
fmt.Println(usage)
}
flag.Parse()
cmd := flag.Arg(0)
@ -439,7 +443,7 @@ func main() {
}()
log.Fatal(<-done)
default:
log.Println(usage)
fmt.Println(usage)
if cmd != "help" {
log.Fatal("Unrecognized command")
}