(volume string, force bool)
| 34 | } |
| 35 | |
| 36 | func removeExecutor(volume string, force bool) common.Executor { |
| 37 | return func(ctx context.Context) error { |
| 38 | logger := common.Logger(ctx) |
| 39 | logger.Debugf("%sdocker volume rm %s", logPrefix, volume) |
| 40 | |
| 41 | if common.Dryrun(ctx) { |
| 42 | return nil |
| 43 | } |
| 44 | |
| 45 | cli, err := GetDockerClient(ctx) |
| 46 | if err != nil { |
| 47 | return err |
| 48 | } |
| 49 | defer cli.Close() |
| 50 | |
| 51 | _, err = cli.VolumeRemove(ctx, volume, client.VolumeRemoveOptions{Force: force}) |
| 52 | return err |
| 53 | } |
| 54 | } |
no test coverage detected
searching dependent graphs…