MCPcopy
hub / github.com/urfave/cli / setupCommandGraph

Method setupCommandGraph

command_setup.go:169–179  ·  command_setup.go::Command.setupCommandGraph
()

Source from the content-addressed store, hash-verified

167}
168
169func (cmd *Command) setupCommandGraph() {
170 tracef("setting up command graph (cmd=%[1]q)", cmd.Name)
171
172 _ = cmd.Walk(func(sub *Command) error {
173 for _, subCmd := range sub.Commands {
174 subCmd.parent = sub
175 subCmd.setupSubcommand()
176 }
177 return nil
178 })
179}
180
181func (cmd *Command) setupSubcommand() {
182 tracef("setting up self as sub-command (cmd=%[1]q)", cmd.Name)

Callers 4

TestWrappedCommandHelpFunction · 0.95
runMethod · 0.95
TestFishCompletionFunction · 0.80

Calls 3

WalkMethod · 0.95
tracefFunction · 0.85
setupSubcommandMethod · 0.80

Tested by 3

TestWrappedCommandHelpFunction · 0.76
TestFishCompletionFunction · 0.64