newNetworkCommand returns a cobra command for `network` subcommands
(dockerCLI command.Cli)
| 13 | |
| 14 | // newNetworkCommand returns a cobra command for `network` subcommands |
| 15 | func newNetworkCommand(dockerCLI command.Cli) *cobra.Command { |
| 16 | cmd := &cobra.Command{ |
| 17 | Use: "network", |
| 18 | Short: "Manage networks", |
| 19 | Args: cli.NoArgs, |
| 20 | RunE: command.ShowHelp(dockerCLI.Err()), |
| 21 | Annotations: map[string]string{"version": "1.21"}, |
| 22 | |
| 23 | DisableFlagsInUseLine: true, |
| 24 | } |
| 25 | cmd.AddCommand( |
| 26 | newConnectCommand(dockerCLI), |
| 27 | newCreateCommand(dockerCLI), |
| 28 | newDisconnectCommand(dockerCLI), |
| 29 | newInspectCommand(dockerCLI), |
| 30 | newListCommand(dockerCLI), |
| 31 | newRemoveCommand(dockerCLI), |
| 32 | newPruneCommand(dockerCLI), |
| 33 | ) |
| 34 | return cmd |
| 35 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…