summaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-07-22 13:13:50 +0200
committerGitHub <noreply@github.com>2019-07-22 13:13:50 +0200
commit3b52e4d0b5baacf5f63516c664a117a7537a075e (patch)
treeef6dc8150136e7941daf45a2e6b615dee43c7893 /libpod/container.go
parentd6b41eb393c154eaff79b4fdcb04c7510a6fdb20 (diff)
parentdb826d5d75630cca784bd7092eba5b06601ae27f (diff)
downloadpodman-3b52e4d0b5baacf5f63516c664a117a7537a075e.tar.gz
podman-3b52e4d0b5baacf5f63516c664a117a7537a075e.tar.bz2
podman-3b52e4d0b5baacf5f63516c664a117a7537a075e.zip
Merge pull request #3562 from baude/golangcilint3
golangci-lint round #3
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.