newConfigCommand returns a cobra command for `config` subcommands
(dockerCLI command.Cli)
| 15 | |
| 16 | // newConfigCommand returns a cobra command for `config` subcommands |
| 17 | func 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 |
| 39 | func completeNames(dockerCLI completion.APIClientProvider) cobra.CompletionFunc { |
nothing calls this directly
no test coverage detected
searching dependent graphs…