MCPcopy Index your code
hub / github.com/cloudfoundry/cli / displayHelpPreamble

Method displayHelpPreamble

command/common/help_command.go:71–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69}
70
71func (cmd HelpCommand) displayHelpPreamble() {
72 cmd.UI.DisplayHeader("NAME:")
73 cmd.UI.DisplayText(sharedaction.AllCommandsIndent+"{{.CommandName}} - {{.CommandDescription}}",
74 map[string]interface{}{
75 "CommandName": cmd.Config.BinaryName(),
76 "CommandDescription": cmd.UI.TranslateText("A command line tool to interact with Cloud Foundry"),
77 })
78 cmd.UI.DisplayNewline()
79
80 cmd.UI.DisplayHeader("USAGE:")
81 cmd.UI.DisplayText(sharedaction.AllCommandsIndent+"{{.CommandName}} {{.CommandUsage}}",
82 map[string]interface{}{
83 "CommandName": cmd.Config.BinaryName(),
84 "CommandUsage": cmd.UI.TranslateText("[global options] command [arguments...] [command options]"),
85 })
86 cmd.UI.DisplayNewline()
87
88 cmd.UI.DisplayHeader("VERSION:")
89 cmd.UI.DisplayText(sharedaction.AllCommandsIndent + cmd.Config.BinaryVersion())
90 cmd.UI.DisplayNewline()
91}
92
93func (cmd HelpCommand) displayAllCommands(pluginCommands []configv3.PluginCommand, cmdInfo map[string]sharedaction.CommandInfo, longestCmd int) {
94 cmd.displayCommandGroups(internal.HelpCategoryList, cmdInfo, longestCmd)

Callers 1

displayFullHelpMethod · 0.95

Calls 6

DisplayHeaderMethod · 0.65
DisplayTextMethod · 0.65
BinaryNameMethod · 0.65
TranslateTextMethod · 0.65
DisplayNewlineMethod · 0.65
BinaryVersionMethod · 0.65

Tested by

no test coverage detected