(ctx context.Context, dockerCLI command.Cli, nodeIDs []string, opts removeOptions)
| 35 | } |
| 36 | |
| 37 | func 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 | } |
no test coverage detected
searching dependent graphs…