MCPcopy Index your code
hub / github.com/docker/cli / newNetworkCommand

Function newNetworkCommand

cli/command/network/cmd.go:15–35  ·  view source on GitHub ↗

newNetworkCommand returns a cobra command for `network` subcommands

(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

13
14// newNetworkCommand returns a cobra command for `network` subcommands
15func 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}

Callers

nothing calls this directly

Calls 8

newConnectCommandFunction · 0.85
newDisconnectCommandFunction · 0.85
newCreateCommandFunction · 0.70
newInspectCommandFunction · 0.70
newListCommandFunction · 0.70
newRemoveCommandFunction · 0.70
newPruneCommandFunction · 0.70
ErrMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…