MCPcopy
hub / github.com/digitalocean/doctl / AddCommand

Method AddCommand

commands/command.go:44–49  ·  view source on GitHub ↗

AddCommand adds child commands and adds child commands for cobra as well.

(commands ...*Command)

Source from the content-addressed store, hash-verified

42
43// AddCommand adds child commands and adds child commands for cobra as well.
44func (c *Command) AddCommand(commands ...*Command) {
45 c.childCommands = append(c.childCommands, commands...)
46 for _, cmd := range commands {
47 c.Command.AddCommand(cmd.Command)
48 }
49}
50
51// ChildCommands returns the child commands.
52func (c *Command) ChildCommands() []*Command {

Callers 15

DatabasesFunction · 0.95
SpacesFunction · 0.95
InferenceFunction · 0.95
AgentCmdFunction · 0.95
ServerlessFunction · 0.95
DropletFunction · 0.95
ProjectsFunction · 0.95
NfsFunction · 0.95
NetworkFunction · 0.95
computeCmdFunction · 0.95
GradientAIFunction · 0.95
VPCsFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected