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

Function runRemove

cli/command/service/remove.go:31–43  ·  view source on GitHub ↗
(ctx context.Context, dockerCLI command.Cli, serviceIDs []string)

Source from the content-addressed store, hash-verified

29}
30
31func 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}

Callers 1

newRemoveCommandFunction · 0.70

Calls 3

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