AllChildCommandsHaveGroup returns if all subcommands are assigned to a group
()
| 1374 | |
| 1375 | // AllChildCommandsHaveGroup returns if all subcommands are assigned to a group |
| 1376 | func (c *Command) AllChildCommandsHaveGroup() bool { |
| 1377 | for _, sub := range c.commands { |
| 1378 | if (sub.IsAvailableCommand() || sub == c.helpCommand) && sub.GroupID == "" { |
| 1379 | return false |
| 1380 | } |
| 1381 | } |
| 1382 | return true |
| 1383 | } |
| 1384 | |
| 1385 | // ContainsGroup return if groupID exists in the list of command groups. |
| 1386 | func (c *Command) ContainsGroup(groupID string) bool { |
no test coverage detected