summaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-07-11 05:44:12 -0500
committerbaude <bbaude@redhat.com>2019-07-21 14:22:39 -0500
commitdb826d5d75630cca784bd7092eba5b06601ae27f (patch)
treec60cc844e499d5d57752fdb92d4036ea0487ae3c /libpod/container.go
parenta5aa44c583612e210cf2ba44c3313a2ff27c94da (diff)
downloadpodman-db826d5d75630cca784bd7092eba5b06601ae27f.tar.gz
podman-db826d5d75630cca784bd7092eba5b06601ae27f.tar.bz2
podman-db826d5d75630cca784bd7092eba5b06601ae27f.zip
golangci-lint round #3
this is the third round of preparing to use the golangci-lint on our code base. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/container.go')
-rw-r--r--libpod/container.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpod/container.go b/libpod/container.go
index b71c0b2be..2d96b1120 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -445,7 +445,7 @@ func (c *Container) specFromState() (*spec.Spec, error) {
if err != nil {
return nil, errors.Wrapf(err, "error reading container config")
}
- if err := json.Unmarshal([]byte(content), &returnSpec); err != nil {
+ if err := json.Unmarshal(content, &returnSpec); err != nil {
return nil, errors.Wrapf(err, "error unmarshalling container config")
}
} else {
@@ -1030,7 +1030,7 @@ func (c *Container) StoppedByUser() (bool, error) {
// NamespacePath returns the path of one of the container's namespaces
// If the container is not running, an error will be returned
-func (c *Container) NamespacePath(ns LinuxNS) (string, error) {
+func (c *Container) NamespacePath(linuxNS LinuxNS) (string, error) { //nolint:interfacer
if !c.batched {
c.lock.Lock()
defer c.lock.Unlock()
@@ -1043,11 +1043,11 @@ func (c *Container) NamespacePath(ns LinuxNS) (string, error) {
return "", errors.Wrapf(define.ErrCtrStopped, "cannot get namespace path unless container %s is running", c.ID())
}
- if ns == InvalidNS {
+ if linuxNS == InvalidNS {
return "", errors.Wrapf(define.ErrInvalidArg, "invalid namespace requested from container %s", c.ID())
}
- return fmt.Sprintf("/proc/%d/ns/%s", c.state.PID, ns.String()), nil
+ return fmt.Sprintf("/proc/%d/ns/%s", c.state.PID, linuxNS.String()), nil
}
// CGroupPath returns a cgroups "path" for a given container.