From ff350a04cba8dd7c9304f1a59702a2efd3114eaa Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Tue, 18 Jul 2017 12:25:45 -0400 Subject: [PATCH] Remove unnecessary prune function aliases. Signed-off-by: Daniel Nephin --- cli/command/system/prune.go | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/cli/command/system/prune.go b/cli/command/system/prune.go index c86025fc1f..c0bc434fb0 100644 --- a/cli/command/system/prune.go +++ b/cli/command/system/prune.go @@ -57,26 +57,6 @@ const confirmationTemplate = `WARNING! This will remove: {{- end }} Are you sure you want to continue?` -// runContainerPrune executes a prune command for containers -func runContainerPrune(dockerCli command.Cli, filter opts.FilterOpt) (uint64, string, error) { - return container.RunPrune(dockerCli, filter) -} - -// runNetworkPrune executes a prune command for networks -func runNetworkPrune(dockerCli command.Cli, filter opts.FilterOpt) (uint64, string, error) { - return network.RunPrune(dockerCli, filter) -} - -// runVolumePrune executes a prune command for volumes -func runVolumePrune(dockerCli command.Cli, filter opts.FilterOpt) (uint64, string, error) { - return volume.RunPrune(dockerCli, filter) -} - -// runImagePrune executes a prune command for images -func runImagePrune(dockerCli command.Cli, all bool, filter opts.FilterOpt) (uint64, string, error) { - return image.RunPrune(dockerCli, all, filter) -} - // runBuildCachePrune executes a prune command for build cache func runBuildCachePrune(dockerCli command.Cli, _ opts.FilterOpt) (uint64, string, error) { report, err := dockerCli.Client().BuildCachePrune(context.Background()) @@ -94,14 +74,14 @@ func runPrune(dockerCli command.Cli, options pruneOptions) error { return nil } imagePrune := func(dockerCli command.Cli, filter opts.FilterOpt) (uint64, string, error) { - return runImagePrune(dockerCli, options.all, options.filter) + return image.RunPrune(dockerCli, options.all, options.filter) } pruneFuncs := []func(dockerCli command.Cli, filter opts.FilterOpt) (uint64, string, error){ - runContainerPrune, - runNetworkPrune, + container.RunPrune, + network.RunPrune, } if options.pruneVolumes { - pruneFuncs = append(pruneFuncs, runVolumePrune) + pruneFuncs = append(pruneFuncs, volume.RunPrune) } pruneFuncs = append(pruneFuncs, imagePrune) if options.pruneBuildCache {