(commandGroupList []internal.HelpCategory, cmdInfo map[string]sharedaction.CommandInfo, longestCmd int)
| 106 | } |
| 107 | |
| 108 | func (cmd HelpCommand) displayCommandGroups(commandGroupList []internal.HelpCategory, cmdInfo map[string]sharedaction.CommandInfo, longestCmd int) { |
| 109 | for i, category := range commandGroupList { |
| 110 | cmd.UI.DisplayHeader(category.CategoryName) |
| 111 | |
| 112 | for j, row := range category.CommandList { |
| 113 | for _, command := range row { |
| 114 | cmd.UI.DisplayText(sharedaction.AllCommandsIndent+"{{.CommandName}}{{.Gap}}{{.CommandDescription}}", |
| 115 | map[string]interface{}{ |
| 116 | "CommandName": cmdInfo[command].Name, |
| 117 | "CommandDescription": cmd.UI.TranslateText(cmdInfo[command].Description), |
| 118 | "Gap": strings.Repeat(" ", longestCmd+1-len(command)), |
| 119 | }) |
| 120 | } |
| 121 | |
| 122 | if j < len(category.CommandList)-1 || i < len(commandGroupList)-1 { |
| 123 | cmd.UI.DisplayNewline() |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | func (cmd HelpCommand) displayHelpFooter(cmdInfo map[string]sharedaction.CommandInfo) { |
| 130 | cmd.UI.DisplayHeader("ENVIRONMENT VARIABLES:") |
no test coverage detected