MCPcopy
hub / github.com/abiosoft/ishell / Children

Method Children

command.go:56–63  ·  view source on GitHub ↗

Children returns the subcommands of c.

()

Source from the content-addressed store, hash-verified

54
55// Children returns the subcommands of c.
56func (c *Cmd) Children() []*Cmd {
57 var cmds []*Cmd
58 for _, cmd := range c.children {
59 cmds = append(cmds, cmd)
60 }
61 sort.Sort(cmdSorter(cmds))
62 return cmds
63}
64
65func (c *Cmd) hasSubcommand() bool {
66 if len(c.children) > 1 {

Callers 4

HelpTextMethod · 0.95
TestAddCommandFunction · 0.80
TestDeleteCommandFunction · 0.80

Calls 1

cmdSorterTypeAlias · 0.85

Tested by 3

TestAddCommandFunction · 0.64
TestDeleteCommandFunction · 0.64