Merge pull request #9313 from iamthemuffinman/master
Cleanup main help message to look cleaner
This commit is contained in:
commit
4b992dc770
29
help.go
29
help.go
|
@ -28,19 +28,22 @@ func helpFunc(commands map[string]cli.CommandFactory) string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var buf bytes.Buffer
|
helpText := fmt.Sprintf(`
|
||||||
buf.WriteString("usage: terraform [--version] [--help] <command> [args]\n\n")
|
Usage: terraform [--version] [--help] <command> [args]
|
||||||
buf.WriteString(
|
|
||||||
"The available commands for execution are listed below.\n" +
|
The available commands for execution are listed below.
|
||||||
"The most common, useful commands are shown first, followed by\n" +
|
The most common, useful commands are shown first, followed by
|
||||||
"less common or more advanced commands. If you're just getting\n" +
|
less common or more advanced commands. If you're just getting
|
||||||
"started with Terraform, stick with the common commands. For the\n" +
|
started with Terraform, stick with the common commands. For the
|
||||||
"other commands, please read the help and docs before usage.\n\n")
|
other commands, please read the help and docs before usage.
|
||||||
buf.WriteString("Common commands:\n")
|
|
||||||
buf.WriteString(listCommands(porcelain, maxKeyLen))
|
Common commands:
|
||||||
buf.WriteString("\nAll other commands:\n")
|
%s
|
||||||
buf.WriteString(listCommands(plumbing, maxKeyLen))
|
All other commands:
|
||||||
return buf.String()
|
%s
|
||||||
|
`, listCommands(porcelain, maxKeyLen), listCommands(plumbing, maxKeyLen))
|
||||||
|
|
||||||
|
return strings.TrimSpace(helpText)
|
||||||
}
|
}
|
||||||
|
|
||||||
// listCommands just lists the commands in the map with the
|
// listCommands just lists the commands in the map with the
|
||||||
|
|
Loading…
Reference in New Issue