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

Function removeConfigs

cli/command/stack/remove.go:142–152  ·  view source on GitHub ↗
(ctx context.Context, dockerCLI command.Cli, configs []swarm.Config)

Source from the content-addressed store, hash-verified

140}
141
142func removeConfigs(ctx context.Context, dockerCLI command.Cli, configs []swarm.Config) bool {
143 var hasError bool
144 for _, config := range configs {
145 _, _ = fmt.Fprintln(dockerCLI.Out(), "Removing config", config.Spec.Name)
146 if _, err := dockerCLI.Client().ConfigRemove(ctx, config.ID, client.ConfigRemoveOptions{}); err != nil {
147 hasError = true
148 _, _ = fmt.Fprintf(dockerCLI.Err(), "Failed to remove config %s: %s", config.ID, err)
149 }
150 }
151 return hasError
152}
153
154var numberedStates = map[swarm.TaskState]int64{
155 swarm.TaskStateNew: 1,

Callers 1

runRemoveFunction · 0.70

Calls 4

OutMethod · 0.65
ClientMethod · 0.65
ErrMethod · 0.65
ConfigRemoveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…