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

Function newContextCommand

cli/command/context/cmd.go:15–36  ·  view source on GitHub ↗

newContextCommand returns the context cli subcommand

(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

13
14// newContextCommand returns the context cli subcommand
15func newContextCommand(dockerCLI command.Cli) *cobra.Command {
16 cmd := &cobra.Command{
17 Use: "context",
18 Short: "Manage contexts",
19 Args: cli.NoArgs,
20 RunE: command.ShowHelp(dockerCLI.Err()),
21
22 DisableFlagsInUseLine: true,
23 }
24 cmd.AddCommand(
25 newCreateCommand(dockerCLI),
26 newListCommand(dockerCLI),
27 newUseCommand(dockerCLI),
28 newExportCommand(dockerCLI),
29 newImportCommand(dockerCLI),
30 newRemoveCommand(dockerCLI),
31 newUpdateCommand(dockerCLI),
32 newInspectCommand(dockerCLI),
33 newShowCommand(dockerCLI),
34 )
35 return cmd
36}

Callers

nothing calls this directly

Calls 10

newUseCommandFunction · 0.85
newShowCommandFunction · 0.85
newCreateCommandFunction · 0.70
newListCommandFunction · 0.70
newExportCommandFunction · 0.70
newImportCommandFunction · 0.70
newRemoveCommandFunction · 0.70
newUpdateCommandFunction · 0.70
newInspectCommandFunction · 0.70
ErrMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…