mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 01:45:44 +03:00
Vendor new cli
This commit is contained in:
4
vendor/github.com/mitchellh/cli/help.go
generated
vendored
4
vendor/github.com/mitchellh/cli/help.go
generated
vendored
@@ -18,7 +18,7 @@ func BasicHelpFunc(app string) HelpFunc {
|
||||
return func(commands map[string]CommandFactory) string {
|
||||
var buf bytes.Buffer
|
||||
buf.WriteString(fmt.Sprintf(
|
||||
"usage: %s [--version] [--help] <command> [<args>]\n\n",
|
||||
"Usage: %s [--version] [--help] <command> [<args>]\n\n",
|
||||
app))
|
||||
buf.WriteString("Available commands are:\n")
|
||||
|
||||
@@ -26,7 +26,7 @@ func BasicHelpFunc(app string) HelpFunc {
|
||||
// key length so they can be aligned properly.
|
||||
keys := make([]string, 0, len(commands))
|
||||
maxKeyLen := 0
|
||||
for key, _ := range commands {
|
||||
for key := range commands {
|
||||
if len(key) > maxKeyLen {
|
||||
maxKeyLen = len(key)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user