diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-22 22:06:02 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-22 22:43:37 +0900 |
| commit | 8000a2febb546b3b68eddd9330d5709281068e9f (patch) | |
| tree | 7b43ae152cc5979e4db65a3632eb542c03654a47 /command/command.go | |
| parent | 7bd48d34899e01d0dc3f0bfb042690f9ee0b1219 (diff) | |
command: implement help builder
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'command/command.go')
| -rw-r--r-- | command/command.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/command/command.go b/command/command.go index 79833b32..55f0eade 100644 --- a/command/command.go +++ b/command/command.go @@ -1,7 +1,10 @@ // Package command implements generic nested command parsing. package command -import "flag" +import ( + "flag" + "strings" +) type ( // HandlerFunc is called when matching a directly handled subcommand tree. @@ -13,7 +16,7 @@ type ( // FlagDefiner is a deferred flag definer value, usually encapsulating the default value. FlagDefiner interface { // Define defines the flag in set. - Define(set *flag.FlagSet, p any, name, usage string) + Define(b *strings.Builder, set *flag.FlagSet, p any, name, usage string) } Command interface { |
