Fixing help text of "docker network --help" to be consistend

Changed from hashmap to multidimensional array as in "docker volume --help"
closes #21710

Signed-off-by: Robin Naundorf <r.naundorf@fh-muenster.de>
This commit is contained in:
Robin Naundorf 2016-04-01 14:03:04 +02:00
parent 4a7bd7eaef
commit 737219bbdb
1 changed files with 9 additions and 9 deletions

View File

@ -372,19 +372,19 @@ func subnetMatches(subnet, data string) (bool, error) {
}
func networkUsage() string {
networkCommands := map[string]string{
"create": "Create a network",
"connect": "Connect container to a network",
"disconnect": "Disconnect container from a network",
"inspect": "Display detailed network information",
"ls": "List all networks",
"rm": "Remove a network",
networkCommands := [][]string{
{"create", "Create a network"},
{"connect", "Connect container to a network"},
{"disconnect", "Disconnect container from a network"},
{"inspect", "Display detailed network information"},
{"ls", "List all networks"},
{"rm", "Remove a network"},
}
help := "Commands:\n"
for cmd, description := range networkCommands {
help += fmt.Sprintf(" %-25.25s%s\n", cmd, description)
for _, cmd := range networkCommands {
help += fmt.Sprintf(" %-25.25s%s\n", cmd[0], cmd[1])
}
help += fmt.Sprintf("\nRun 'docker network COMMAND --help' for more information on a command.")