(dockerCLI command.Cli)
| 12 | ) |
| 13 | |
| 14 | func newConfigRemoveCommand(dockerCLI command.Cli) *cobra.Command { |
| 15 | return &cobra.Command{ |
| 16 | Use: "rm CONFIG [CONFIG...]", |
| 17 | Aliases: []string{"remove"}, |
| 18 | Short: "Remove one or more configs", |
| 19 | Args: cli.RequiresMinArgs(1), |
| 20 | RunE: func(cmd *cobra.Command, args []string) error { |
| 21 | return runRemove(cmd.Context(), dockerCLI, args) |
| 22 | }, |
| 23 | ValidArgsFunction: completeNames(dockerCLI), |
| 24 | DisableFlagsInUseLine: true, |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | // runRemove removes the given Swarm configs. |
| 29 | func runRemove(ctx context.Context, dockerCLI command.Cli, names []string) error { |
searching dependent graphs…