command: hard wrap help message flags
Test / Create distribution (push) Successful in 53s
Test / Sandbox (push) Successful in 2m51s
Test / Hakurei (push) Successful in 4m29s
Test / Sandbox (race detector) (push) Successful in 5m53s
Test / Hakurei (race detector) (push) Successful in 7m2s
Test / ShareFS (push) Successful in 7m19s
Test / Flake checks (push) Successful in 1m8s
Test / Create distribution (push) Successful in 53s
Test / Sandbox (push) Successful in 2m51s
Test / Hakurei (push) Successful in 4m29s
Test / Sandbox (race detector) (push) Successful in 5m53s
Test / Hakurei (race detector) (push) Successful in 7m2s
Test / ShareFS (push) Successful in 7m19s
Test / Flake checks (push) Successful in 1m8s
This greatly improves readability when lots of flags are registered. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
+1
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user