MCPcopy Create free account
hub / github.com/algolia/cli / getCommands

Function getCommands

internal/docs/docs.go:112–126  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

110}
111
112func getCommands(cmd *cobra.Command) []Command {
113 var commands []Command
114 for _, c := range cmd.Commands() {
115 if c.Hidden || c.Name() == "help" {
116 continue
117 }
118 command := newCommand(c)
119 if c.HasAvailableSubCommands() {
120 command.SubCommands = getCommands(c)
121 }
122 commands = append(commands, command)
123 }
124
125 return commands
126}
127
128func describeCommand(cmd *cobra.Command) Command {
129 command := newCommand(cmd)

Callers 3

GenYamlTreeFunction · 0.85
describeCommandFunction · 0.85

Calls 1

newCommandFunction · 0.85