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

Function newConfigRemoveCommand

cli/command/config/remove.go:14–26  ·  view source on GitHub ↗
(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

12)
13
14func 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.
29func runRemove(ctx context.Context, dockerCLI command.Cli, names []string) error {

Callers 4

newConfigCommandFunction · 0.85
TestConfigRemoveErrorsFunction · 0.85
TestConfigRemoveWithNameFunction · 0.85

Calls 2

runRemoveFunction · 0.70
completeNamesFunction · 0.70

Tested by 3

TestConfigRemoveErrorsFunction · 0.68
TestConfigRemoveWithNameFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…