From db826d5d75630cca784bd7092eba5b06601ae27f Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 11 Jul 2019 05:44:12 -0500 Subject: golangci-lint round #3 this is the third round of preparing to use the golangci-lint on our code base. Signed-off-by: baude --- cmd/podman/cp.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'cmd/podman/cp.go') diff --git a/cmd/podman/cp.go b/cmd/podman/cp.go index 7c28edd26..bee7d2199 100644 --- a/cmd/podman/cp.go +++ b/cmd/podman/cp.go @@ -122,7 +122,7 @@ func copyBetweenHostAndContainer(runtime *libpod.Runtime, src string, dest strin if errors.Cause(err) != define.ErrCtrStateInvalid { return err } - } else if err == nil { + } else { // Only add the defer if we actually paused defer func() { if err := ctr.Unpause(); err != nil { @@ -486,10 +486,7 @@ func matchVolumePath(path, target string) bool { for len(pathStr) > len(target) && strings.Contains(pathStr, string(os.PathSeparator)) { pathStr = pathStr[:strings.LastIndex(pathStr, string(os.PathSeparator))] } - if pathStr == target { - return true - } - return false + return pathStr == target } func pathWithBindMountSource(m specs.Mount, path string) (string, error) { -- cgit v1.2.3-54-g00ecf