mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-06 00:45:43 +00:00
Rather than append LocalhostSSHArgs to args, prepend it, assuming the
order doesn't matter here.
This fixes the following prealloc warning (without decreasing
readability):
> cmd/podman/machine/cp.go:130:2: Consider preallocating args (prealloc)
> args := []string{"-r", "-i", sshConfig.IdentityPath, "-P", strconv.Itoa(sshConfig.Port)}
> ^
This commit is part of series fixing issues reported by prealloc linter
from golangci-lint v2.8.0.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
|
||
|---|---|---|
| .. | ||
| os | ||
| client9p.go | ||
| cp.go | ||
| info.go | ||
| init.go | ||
| inspect.go | ||
| list.go | ||
| machine.go | ||
| machine_unix.go | ||
| machine_unsupported.go | ||
| machine_windows.go | ||
| os.go | ||
| reset.go | ||
| rm.go | ||
| server9p.go | ||
| set.go | ||
| ssh.go | ||
| start.go | ||
| stop.go | ||