diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-23 01:17:57 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-23 01:17:57 +0900 |
| commit | 416d93e8802dc4f42ce814edf874c79e2682af58 (patch) | |
| tree | 119b758f8f0f582404f9d0dc11a5a95f693599e9 /command/help.go | |
| parent | 312753924be1109a22269ebde81fa244ef9b6379 (diff) | |
command: expose print help
This is useful for custom help commands.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'command/help.go')
| -rw-r--r-- | command/help.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/command/help.go b/command/help.go index 0bcc15f1..a3735406 100644 --- a/command/help.go +++ b/command/help.go @@ -10,6 +10,8 @@ import ( var ErrHelp = errors.New("help requested") +func (n *node) PrintHelp() { _ = n.writeHelp() } + func (n *node) writeHelp() error { if _, err := fmt.Fprintf(n.out, "\nUsage:\t%s [-h | --help]%s COMMAND [OPTIONS]\n", |
