From f1dd3a085b029ecf29b75373c0f7c982dbe72b88 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 7 Aug 2026 20:32:24 +0900 Subject: command: hard wrap help message flags This greatly improves readability when lots of flags are registered. Signed-off-by: Ophestra --- command/builder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'command/builder.go') diff --git a/command/builder.go b/command/builder.go index d3b0c3f5..174010ea 100644 --- a/command/builder.go +++ b/command/builder.go @@ -23,8 +23,8 @@ func newNode(output io.Writer, logf LogFunc, name, usage string) *node { n.set.SetOutput(output) n.set.Usage = func() { _ = n.writeHelp() - if n.suffix.Len() > 0 { - _, _ = fmt.Fprintln(output, "Flags:") + if len(n.suffix) > 0 { + _, _ = fmt.Fprintln(output, "flags:") n.set.PrintDefaults() _, _ = fmt.Fprintln(output) } -- cgit v1.3.1