From 19ea0d9a58984cc1c3860e39786b903d15ff9daf Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Sun, 12 Mar 2023 15:25:16 +0100 Subject: [PATCH] make all helpall output go to the same file descriptor --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index c6f8b6a..1108f77 100644 --- a/main.go +++ b/main.go @@ -312,11 +312,11 @@ Used to generate documentation. fmt.Fprintf(os.Stderr, "# mox %s\n\n", strings.Join(c.words, " ")) if c.help != "" { - fmt.Println(c.help + "\n") + fmt.Fprintln(os.Stderr, c.help+"\n") } s := c.makeUsage() s = "\t" + strings.ReplaceAll(s, "\n", "\n\t") - fmt.Println(s) + fmt.Fprintln(os.Stderr, s) } }