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

Function runRemove

cli/command/node/remove.go:37–49  ·  view source on GitHub ↗
(ctx context.Context, dockerCLI command.Cli, nodeIDs []string, opts removeOptions)

Source from the content-addressed store, hash-verified

35}
36
37func runRemove(ctx context.Context, dockerCLI command.Cli, nodeIDs []string, opts removeOptions) error {
38 apiClient := dockerCLI.Client()
39
40 var errs []error
41 for _, id := range nodeIDs {
42 if _, err := apiClient.NodeRemove(ctx, id, client.NodeRemoveOptions{Force: opts.force}); err != nil {
43 errs = append(errs, err)
44 continue
45 }
46 _, _ = fmt.Fprintln(dockerCLI.Out(), id)
47 }
48 return errors.Join(errs...)
49}

Callers 1

newRemoveCommandFunction · 0.70

Calls 3

NodeRemoveMethod · 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…