MCPcopy
hub / github.com/nektos/act / removeExecutor

Function removeExecutor

pkg/container/docker_volume.go:36–54  ·  view source on GitHub ↗
(volume string, force bool)

Source from the content-addressed store, hash-verified

34}
35
36func 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}

Callers 1

Calls 4

LoggerFunction · 0.92
DryrunFunction · 0.92
GetDockerClientFunction · 0.85
CloseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…