command: hard wrap help message flags

This greatly improves readability when lots of flags are registered.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
cat
2026-08-07 20:32:24 +09:00
parent b37c1d8993
commit f1dd3a085b
6 changed files with 58 additions and 36 deletions
+1 -2
View File
@@ -3,7 +3,6 @@ package command
import (
"flag"
"io"
"strings"
)
// A node represents a command.
@@ -17,7 +16,7 @@ type node struct {
// Names of commands preceding node.
prefix []string
// Short user-facing representations of flags received by node.
suffix strings.Builder
suffix []string
f HandlerFunc
set *flag.FlagSet