diff options
author | baude <bbaude@redhat.com> | 2019-07-03 15:37:17 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-07-08 09:18:11 -0500 |
commit | 1d36501f961889f554daf3c696fe95443ef211b6 (patch) | |
tree | 4a8d7aa79f46a0096ad7952f1390d6909a9d894b /libpod/common_test.go | |
parent | f7407f2eb512e1407f8281009eb829f37405119b (diff) | |
download | podman-1d36501f961889f554daf3c696fe95443ef211b6.tar.gz podman-1d36501f961889f554daf3c696fe95443ef211b6.tar.bz2 podman-1d36501f961889f554daf3c696fe95443ef211b6.zip |
code cleanup
clean up code identified as problematic by golands inspection
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/common_test.go')
-rw-r--r-- | libpod/common_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libpod/common_test.go b/libpod/common_test.go index ae3cb1c87..93ca7bc71 100644 --- a/libpod/common_test.go +++ b/libpod/common_test.go @@ -89,13 +89,13 @@ func getTestContainer(id, name string, manager lock.Manager) (*Container, error) ctr.config.Labels["test"] = "testing" - // Allocate a lock for the container - lock, err := manager.AllocateLock() + // Allocate a containerLock for the container + containerLock, err := manager.AllocateLock() if err != nil { return nil, err } - ctr.lock = lock - ctr.config.LockID = lock.ID() + ctr.lock = containerLock + ctr.config.LockID = containerLock.ID() return ctr, nil } @@ -114,13 +114,13 @@ func getTestPod(id, name string, manager lock.Manager) (*Pod, error) { valid: true, } - // Allocate a lock for the pod - lock, err := manager.AllocateLock() + // Allocate a podLock for the pod + podLock, err := manager.AllocateLock() if err != nil { return nil, err } - pod.lock = lock - pod.config.LockID = lock.ID() + pod.lock = podLock + pod.config.LockID = podLock.ID() return pod, nil } |