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

Method VisibleCommands

command.go:265–274  ·  view source on GitHub ↗

VisibleCommands returns a slice of the Commands with Hidden=false

()

Source from the content-addressed store, hash-verified

263
264// VisibleCommands returns a slice of the Commands with Hidden=false
265func (cmd *Command) VisibleCommands() []*Command {
266 var ret []*Command
267 for _, command := range cmd.Commands {
268 if command.Hidden || command.Name == helpName {
269 continue
270 }
271 ret = append(ret, command)
272 }
273 return ret
274}
275
276// VisibleFlagCategories returns a slice containing all the visible flag categories with the flags they contain
277func (cmd *Command) VisibleFlagCategories() []VisibleFlagCategory {

Callers 2

Calls

no outgoing calls

Tested by 2