(ctx context.Context, containers Containers, options api.RemoveOptions)
| 96 | } |
| 97 | |
| 98 | func (s *composeService) remove(ctx context.Context, containers Containers, options api.RemoveOptions) error { |
| 99 | eg, ctx := errgroup.WithContext(ctx) |
| 100 | for _, ctr := range containers { |
| 101 | eg.Go(func() error { |
| 102 | eventName := getContainerProgressName(ctr) |
| 103 | s.events.On(removingEvent(eventName)) |
| 104 | _, err := s.apiClient().ContainerRemove(ctx, ctr.ID, client.ContainerRemoveOptions{ |
| 105 | RemoveVolumes: options.Volumes, |
| 106 | Force: options.Force, |
| 107 | }) |
| 108 | if err == nil { |
| 109 | s.events.On(removedEvent(eventName)) |
| 110 | } |
| 111 | return err |
| 112 | }) |
| 113 | } |
| 114 | return eg.Wait() |
| 115 | } |
no test coverage detected