(ctx context.Context, dockerCli command.Cli, secrets []swarm.Secret)
| 128 | } |
| 129 | |
| 130 | func removeSecrets(ctx context.Context, dockerCli command.Cli, secrets []swarm.Secret) bool { |
| 131 | var hasError bool |
| 132 | for _, secret := range secrets { |
| 133 | _, _ = fmt.Fprintln(dockerCli.Out(), "Removing secret", secret.Spec.Name) |
| 134 | if _, err := dockerCli.Client().SecretRemove(ctx, secret.ID, client.SecretRemoveOptions{}); err != nil { |
| 135 | hasError = true |
| 136 | _, _ = fmt.Fprintf(dockerCli.Err(), "Failed to remove secret %s: %s", secret.ID, err) |
| 137 | } |
| 138 | } |
| 139 | return hasError |
| 140 | } |
| 141 | |
| 142 | func removeConfigs(ctx context.Context, dockerCLI command.Cli, configs []swarm.Config) bool { |
| 143 | var hasError bool |
no test coverage detected
searching dependent graphs…