From 3dfdaa6458197deb7efa6c906e15c5db97d444ff 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 4d21783d7c..f00c9126d0 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) {