summaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
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.