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

Function removeSecrets

cli/command/stack/remove.go:130–140  ·  view source on GitHub ↗
(ctx context.Context, dockerCli command.Cli, secrets []swarm.Secret)

Source from the content-addressed store, hash-verified

128}
129
130func 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
142func removeConfigs(ctx context.Context, dockerCLI command.Cli, configs []swarm.Config) bool {
143 var hasError bool

Callers 1

runRemoveFunction · 0.85

Calls 4

OutMethod · 0.65
ClientMethod · 0.65
ErrMethod · 0.65
SecretRemoveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…