From c3d7f167bd2586fa597471c206a2d32deeea85e5 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 29 Mar 2023 15:54:33 +0200 Subject: [PATCH] cli/command: RunPrune(): remove name for unused "all" parameter (revive) These functions must have the same signature, but only some of them accept an "all" boolean argument; https://github.com/docker/cli/blob/88924b180210be1b6b82a7ad1ac6732606ff270f/cli/command/system/prune.go#L79 cli/command/container/prune.go:78:38: unused-parameter: parameter 'all' seems to be unused, consider removing or renaming it as _ (revive) func RunPrune(dockerCli command.Cli, all bool, filter opts.FilterOpt) (uint64, string, error) { ^ cli/command/network/prune.go:73:38: unused-parameter: parameter 'all' seems to be unused, consider removing or renaming it as _ (revive) func RunPrune(dockerCli command.Cli, all bool, filter opts.FilterOpt) (uint64, string, error) { ^ cli/command/volume/prune.go:78:38: unused-parameter: parameter 'all' seems to be unused, consider removing or renaming it as _ (revive) func RunPrune(dockerCli command.Cli, all bool, filter opts.FilterOpt) (uint64, string, error) { ^ Signed-off-by: Sebastiaan van Stijn --- cli/command/container/prune.go | 2 +- cli/command/network/prune.go | 2 +- cli/command/volume/prune.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/command/container/prune.go b/cli/command/container/prune.go index 225ab5f2d2..868560ef71 100644 --- a/cli/command/container/prune.go +++ b/cli/command/container/prune.go @@ -75,6 +75,6 @@ func runPrune(dockerCli command.Cli, options pruneOptions) (spaceReclaimed uint6 // RunPrune calls the Container Prune API // This returns the amount of space reclaimed and a detailed output string -func RunPrune(dockerCli command.Cli, all bool, filter opts.FilterOpt) (uint64, string, error) { +func RunPrune(dockerCli command.Cli, _ bool, filter opts.FilterOpt) (uint64, string, error) { return runPrune(dockerCli, pruneOptions{force: true, filter: filter}) } diff --git a/cli/command/network/prune.go b/cli/command/network/prune.go index 928edb3344..460a5b5646 100644 --- a/cli/command/network/prune.go +++ b/cli/command/network/prune.go @@ -70,7 +70,7 @@ func runPrune(dockerCli command.Cli, options pruneOptions) (output string, err e // RunPrune calls the Network Prune API // This returns the amount of space reclaimed and a detailed output string -func RunPrune(dockerCli command.Cli, all bool, filter opts.FilterOpt) (uint64, string, error) { +func RunPrune(dockerCli command.Cli, _ bool, filter opts.FilterOpt) (uint64, string, error) { output, err := runPrune(dockerCli, pruneOptions{force: true, filter: filter}) return 0, output, err } diff --git a/cli/command/volume/prune.go b/cli/command/volume/prune.go index 16fd550898..d2d249cdb3 100644 --- a/cli/command/volume/prune.go +++ b/cli/command/volume/prune.go @@ -75,6 +75,6 @@ func runPrune(dockerCli command.Cli, options pruneOptions) (spaceReclaimed uint6 // RunPrune calls the Volume Prune API // This returns the amount of space reclaimed and a detailed output string -func RunPrune(dockerCli command.Cli, all bool, filter opts.FilterOpt) (uint64, string, error) { +func RunPrune(dockerCli command.Cli, _ bool, filter opts.FilterOpt) (uint64, string, error) { return runPrune(dockerCli, pruneOptions{force: true, filter: filter}) }