HasHelpSubCommands determines if a command has any available 'help' sub commands that need to be shown in the usage/help default template under 'additional help topics'.
()
| 1646 | // that need to be shown in the usage/help default template under 'additional help |
| 1647 | // topics'. |
| 1648 | func (c *Command) HasHelpSubCommands() bool { |
| 1649 | // return true on the first found available 'help' sub command |
| 1650 | for _, sub := range c.commands { |
| 1651 | if sub.IsAdditionalHelpTopicCommand() { |
| 1652 | return true |
| 1653 | } |
| 1654 | } |
| 1655 | |
| 1656 | // the command either has no sub commands, or no available 'help' sub commands |
| 1657 | return false |
| 1658 | } |
| 1659 | |
| 1660 | // HasAvailableSubCommands determines if a command has available sub commands that |
| 1661 | // need to be shown in the usage/help default template under 'available commands'. |
no test coverage detected