VisibleCommands returns a slice of the Commands with Hidden=false
()
| 263 | |
| 264 | // VisibleCommands returns a slice of the Commands with Hidden=false |
| 265 | func (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 |
| 277 | func (cmd *Command) VisibleFlagCategories() []VisibleFlagCategory { |
no outgoing calls