From 646fc0a844a95152095d48b5420babcc4cd2590e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 3 Sep 2022 18:50:45 +0200 Subject: [PATCH] linting: assigned to src, but reassigned without using the value (wastedassign) cli/command/container/opts.go:928:2: assigned to src, but reassigned without using the value (wastedassign) src := "" ^ Signed-off-by: Sebastiaan van Stijn --- cli/command/container/opts.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli/command/container/opts.go b/cli/command/container/opts.go index 4d21783d7c89..f00c9126d01b 100644 --- a/cli/command/container/opts.go +++ b/cli/command/container/opts.go @@ -925,8 +925,7 @@ func parseDevice(device, serverOS string) (container.DeviceMapping, error) { // parseLinuxDevice parses a device mapping string to a container.DeviceMapping struct // knowing that the target is a Linux daemon func parseLinuxDevice(device string) (container.DeviceMapping, error) { - src := "" - dst := "" + var src, dst string permissions := "rwm" arr := strings.Split(device, ":") switch len(arr) {