(pluginCommands []configv3.PluginCommand, cmdInfo map[string]sharedaction.CommandInfo, longestCmd int)
| 91 | } |
| 92 | |
| 93 | func (cmd HelpCommand) displayAllCommands(pluginCommands []configv3.PluginCommand, cmdInfo map[string]sharedaction.CommandInfo, longestCmd int) { |
| 94 | cmd.displayCommandGroups(internal.HelpCategoryList, cmdInfo, longestCmd) |
| 95 | cmd.UI.DisplayNewline() |
| 96 | |
| 97 | cmd.UI.DisplayHeader("INSTALLED PLUGIN COMMANDS:") |
| 98 | for _, pluginCommand := range pluginCommands { |
| 99 | cmd.UI.DisplayText(sharedaction.AllCommandsIndent+"{{.CommandName}}{{.Gap}}{{.CommandDescription}}", map[string]interface{}{ |
| 100 | "CommandName": pluginCommand.Name, |
| 101 | "CommandDescription": pluginCommand.HelpText, |
| 102 | "Gap": strings.Repeat(" ", longestCmd+1-len(pluginCommand.Name)), |
| 103 | }) |
| 104 | } |
| 105 | cmd.UI.DisplayNewline() |
| 106 | } |
| 107 | |
| 108 | func (cmd HelpCommand) displayCommandGroups(commandGroupList []internal.HelpCategory, cmdInfo map[string]sharedaction.CommandInfo, longestCmd int) { |
| 109 | for i, category := range commandGroupList { |
no test coverage detected