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

Function runRemove

cli/command/config/remove.go:29–42  ·  view source on GitHub ↗

runRemove removes the given Swarm configs.

(ctx context.Context, dockerCLI command.Cli, names []string)

Source from the content-addressed store, hash-verified

27
28// runRemove removes the given Swarm configs.
29func runRemove(ctx context.Context, dockerCLI command.Cli, names []string) error {
30 apiClient := dockerCLI.Client()
31
32 var errs []error
33 for _, name := range names {
34 if _, err := apiClient.ConfigRemove(ctx, name, client.ConfigRemoveOptions{}); err != nil {
35 errs = append(errs, err)
36 continue
37 }
38 _, _ = fmt.Fprintln(dockerCLI.Out(), name)
39 }
40
41 return errors.Join(errs...)
42}

Callers 1

newConfigRemoveCommandFunction · 0.70

Calls 3

ClientMethod · 0.65
OutMethod · 0.65
ConfigRemoveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…