MCPcopy Create free account
hub / github.com/docker/cli / runRemove

Function runRemove

cli/command/secret/remove.go:35–47  ·  view source on GitHub ↗
(ctx context.Context, dockerCLI command.Cli, opts removeOptions)

Source from the content-addressed store, hash-verified

33}
34
35func runRemove(ctx context.Context, dockerCLI command.Cli, opts removeOptions) error {
36 apiClient := dockerCLI.Client()
37
38 var errs []error
39 for _, name := range opts.names {
40 if _, err := apiClient.SecretRemove(ctx, name, client.SecretRemoveOptions{}); err != nil {
41 errs = append(errs, err)
42 continue
43 }
44 _, _ = fmt.Fprintln(dockerCLI.Out(), name)
45 }
46 return errors.Join(errs...)
47}

Callers 1

newSecretRemoveCommandFunction · 0.70

Calls 3

ClientMethod · 0.65
OutMethod · 0.65
SecretRemoveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…