Signed-off-by: Robin Naundorf <r.naundorf@fh-muenster.de>
| ... | ... |
@@ -372,19 +372,19 @@ func subnetMatches(subnet, data string) (bool, error) {
|
| 372 | 372 |
} |
| 373 | 373 |
|
| 374 | 374 |
func networkUsage() string {
|
| 375 |
- networkCommands := map[string]string{
|
|
| 376 |
- "create": "Create a network", |
|
| 377 |
- "connect": "Connect container to a network", |
|
| 378 |
- "disconnect": "Disconnect container from a network", |
|
| 379 |
- "inspect": "Display detailed network information", |
|
| 380 |
- "ls": "List all networks", |
|
| 381 |
- "rm": "Remove a network", |
|
| 375 |
+ networkCommands := [][]string{
|
|
| 376 |
+ {"create", "Create a network"},
|
|
| 377 |
+ {"connect", "Connect container to a network"},
|
|
| 378 |
+ {"disconnect", "Disconnect container from a network"},
|
|
| 379 |
+ {"inspect", "Display detailed network information"},
|
|
| 380 |
+ {"ls", "List all networks"},
|
|
| 381 |
+ {"rm", "Remove a network"},
|
|
| 382 | 382 |
} |
| 383 | 383 |
|
| 384 | 384 |
help := "Commands:\n" |
| 385 | 385 |
|
| 386 |
- for cmd, description := range networkCommands {
|
|
| 387 |
- help += fmt.Sprintf(" %-25.25s%s\n", cmd, description)
|
|
| 386 |
+ for _, cmd := range networkCommands {
|
|
| 387 |
+ help += fmt.Sprintf(" %-25.25s%s\n", cmd[0], cmd[1])
|
|
| 388 | 388 |
} |
| 389 | 389 |
|
| 390 | 390 |
help += fmt.Sprintf("\nRun 'docker network COMMAND --help' for more information on a command.")
|