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

Function newConfigCommand

cli/command/config/cmd.go:17–36  ·  view source on GitHub ↗

newConfigCommand returns a cobra command for `config` subcommands

(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

15
16// newConfigCommand returns a cobra command for `config` subcommands
17func newConfigCommand(dockerCLI command.Cli) *cobra.Command {
18 cmd := &cobra.Command{
19 Use: "config",
20 Short: "Manage Swarm configs",
21 Args: cli.NoArgs,
22 RunE: command.ShowHelp(dockerCLI.Err()),
23 Annotations: map[string]string{
24 "version": "1.30",
25 "swarm": "manager",
26 },
27 DisableFlagsInUseLine: true,
28 }
29 cmd.AddCommand(
30 newConfigListCommand(dockerCLI),
31 newConfigCreateCommand(dockerCLI),
32 newConfigInspectCommand(dockerCLI),
33 newConfigRemoveCommand(dockerCLI),
34 )
35 return cmd
36}
37
38// completeNames offers completion for swarm configs
39func completeNames(dockerCLI completion.APIClientProvider) cobra.CompletionFunc {

Callers

nothing calls this directly

Calls 5

newConfigListCommandFunction · 0.85
newConfigCreateCommandFunction · 0.85
newConfigInspectCommandFunction · 0.85
newConfigRemoveCommandFunction · 0.85
ErrMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…