make all helpall output go to the same file descriptor

This commit is contained in:
Mechiel Lukkien 2023-03-12 15:25:16 +01:00
parent 5535515fcb
commit 19ea0d9a58
No known key found for this signature in database

View file

@ -312,11 +312,11 @@ Used to generate documentation.
fmt.Fprintf(os.Stderr, "# mox %s\n\n", strings.Join(c.words, " ")) fmt.Fprintf(os.Stderr, "# mox %s\n\n", strings.Join(c.words, " "))
if c.help != "" { if c.help != "" {
fmt.Println(c.help + "\n") fmt.Fprintln(os.Stderr, c.help+"\n")
} }
s := c.makeUsage() s := c.makeUsage()
s = "\t" + strings.ReplaceAll(s, "\n", "\n\t") s = "\t" + strings.ReplaceAll(s, "\n", "\n\t")
fmt.Println(s) fmt.Fprintln(os.Stderr, s)
} }
} }