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

Function runRemove

cli/command/volume/remove.go:44–59  ·  view source on GitHub ↗
(ctx context.Context, dockerCLI command.Cli, opts *removeOptions)

Source from the content-addressed store, hash-verified

42}
43
44func runRemove(ctx context.Context, dockerCLI command.Cli, opts *removeOptions) error {
45 apiClient := dockerCLI.Client()
46
47 var errs []error
48 for _, name := range opts.volumes {
49 _, err := apiClient.VolumeRemove(ctx, name, client.VolumeRemoveOptions{
50 Force: opts.force,
51 })
52 if err != nil {
53 errs = append(errs, err)
54 continue
55 }
56 _, _ = fmt.Fprintln(dockerCLI.Out(), name)
57 }
58 return errors.Join(errs...)
59}

Callers 1

newRemoveCommandFunction · 0.70

Calls 3

VolumeRemoveMethod · 0.80
ClientMethod · 0.65
OutMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…