command: expose print help
This is useful for custom help commands. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user