(ctx context.Context, dockerCLI command.Cli, serviceIDs []string)
| 29 | } |
| 30 | |
| 31 | func runRemove(ctx context.Context, dockerCLI command.Cli, serviceIDs []string) error { |
| 32 | apiClient := dockerCLI.Client() |
| 33 | |
| 34 | var errs []error |
| 35 | for _, id := range serviceIDs { |
| 36 | if _, err := apiClient.ServiceRemove(ctx, id, client.ServiceRemoveOptions{}); err != nil { |
| 37 | errs = append(errs, err) |
| 38 | continue |
| 39 | } |
| 40 | _, _ = fmt.Fprintln(dockerCLI.Out(), id) |
| 41 | } |
| 42 | return errors.Join(errs...) |
| 43 | } |
no test coverage detected
searching dependent graphs…