Merge pull request #21719 from senk/21710-fix-client-help-text
Fixing help text of "docker network --help" to be consistent
This commit is contained in:
commit
8d31b0f051
1 changed files with 9 additions and 9 deletions
|
@ -372,19 +372,19 @@ func subnetMatches(subnet, data string) (bool, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func networkUsage() string {
|
func networkUsage() string {
|
||||||
networkCommands := map[string]string{
|
networkCommands := [][]string{
|
||||||
"create": "Create a network",
|
{"create", "Create a network"},
|
||||||
"connect": "Connect container to a network",
|
{"connect", "Connect container to a network"},
|
||||||
"disconnect": "Disconnect container from a network",
|
{"disconnect", "Disconnect container from a network"},
|
||||||
"inspect": "Display detailed network information",
|
{"inspect", "Display detailed network information"},
|
||||||
"ls": "List all networks",
|
{"ls", "List all networks"},
|
||||||
"rm": "Remove a network",
|
{"rm", "Remove a network"},
|
||||||
}
|
}
|
||||||
|
|
||||||
help := "Commands:\n"
|
help := "Commands:\n"
|
||||||
|
|
||||||
for cmd, description := range networkCommands {
|
for _, cmd := range networkCommands {
|
||||||
help += fmt.Sprintf(" %-25.25s%s\n", cmd, description)
|
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.")
|
help += fmt.Sprintf("\nRun 'docker network COMMAND --help' for more information on a command.")
|
||||||
|
|
Loading…
Reference in a new issue