blob: ee08a61acd4aeb72f03e97a336e7afc2aad7c5ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
package command
// the top level node wants [Command] returned for its builder methods
type rootNode struct{ *node }
func (r rootNode) Command(name, usage string, f HandlerFunc) Command {
r.node.Command(name, usage, f)
return r
}
func (r rootNode) Flag(p any, name string, value FlagDefiner, usage string) Command {
r.node.Flag(p, name, value, usage)
return r
}
|