(ctx context.Context, dockerCLI command.Cli, configs []swarm.Config)
| 140 | } |
| 141 | |
| 142 | func 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 | |
| 154 | var numberedStates = map[swarm.TaskState]int64{ |
| 155 | swarm.TaskStateNew: 1, |
no test coverage detected
searching dependent graphs…