command: use NUL for magic usage string

This change also improves documentation.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
cat
2026-08-07 18:57:01 +09:00
parent 6a7f124deb
commit b37c1d8993
6 changed files with 48 additions and 24 deletions
+1
View File
@@ -13,6 +13,7 @@ func New(output io.Writer, logf LogFunc, name string, early HandlerFunc) Command
return c
}
// newNode initialises a subcommand tree and returns its address.
func newNode(output io.Writer, logf LogFunc, name, usage string) *node {
n := &node{
name: name, usage: usage,