summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_exec.go4
-rw-r--r--libpod/container_internal.go2
-rw-r--r--libpod/container_internal_linux.go2
-rw-r--r--libpod/kube.go2
-rw-r--r--libpod/lock/in_memory_locks.go2
5 files changed, 6 insertions, 6 deletions
diff --git a/libpod/container_exec.go b/libpod/container_exec.go
index 140267f28..d782bebf8 100644
--- a/libpod/container_exec.go
+++ b/libpod/container_exec.go
@@ -79,11 +79,11 @@ type ExecConfig struct {
type ExecSession struct {
// Id is the ID of the exec session.
// Named somewhat strangely to not conflict with ID().
- // nolint:stylecheck,golint
+ // nolint:stylecheck,revive
Id string `json:"id"`
// ContainerId is the ID of the container this exec session belongs to.
// Named somewhat strangely to not conflict with ContainerID().
- // nolint:stylecheck,golint
+ // nolint:stylecheck,revive
ContainerId string `json:"containerId"`
// State is the state of the exec session.
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index b051b7f2d..9449d31c7 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -264,7 +264,7 @@ func (c *Container) handleRestartPolicy(ctx context.Context) (_ bool, retErr err
if c.ensureState(define.ContainerStateRunning, define.ContainerStatePaused) {
return false, nil
} else if c.state.State == define.ContainerStateUnknown {
- return false, errors.Wrapf(define.ErrInternal, "invalid container state encountered in restart attempt!")
+ return false, errors.Wrapf(define.ErrInternal, "invalid container state encountered in restart attempt")
}
c.newContainerEvent(events.Restart)
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 6ffd99649..b5f8ad8e8 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -3220,7 +3220,7 @@ func (c *Container) getOCICgroupPath() (string, error) {
}
func (c *Container) copyTimezoneFile(zonePath string) (string, error) {
- var localtimeCopy string = filepath.Join(c.state.RunDir, "localtime")
+ localtimeCopy := filepath.Join(c.state.RunDir, "localtime")
file, err := os.Stat(zonePath)
if err != nil {
return "", err
diff --git a/libpod/kube.go b/libpod/kube.go
index 22fbb5f9f..5e5260dd5 100644
--- a/libpod/kube.go
+++ b/libpod/kube.go
@@ -213,7 +213,7 @@ type YAMLContainer struct {
func ConvertV1PodToYAMLPod(pod *v1.Pod) *YAMLPod {
cs := []*YAMLContainer{}
for _, cc := range pod.Spec.Containers {
- var res *v1.ResourceRequirements = nil
+ var res *v1.ResourceRequirements
if len(cc.Resources.Limits) > 0 || len(cc.Resources.Requests) > 0 {
res = &cc.Resources
}
diff --git a/libpod/lock/in_memory_locks.go b/libpod/lock/in_memory_locks.go
index f3c842f89..f7f47760c 100644
--- a/libpod/lock/in_memory_locks.go
+++ b/libpod/lock/in_memory_locks.go
@@ -49,7 +49,7 @@ type InMemoryManager struct {
// of locks.
func NewInMemoryManager(numLocks uint32) (Manager, error) {
if numLocks == 0 {
- return nil, errors.Errorf("must provide a non-zero number of locks!")
+ return nil, errors.Errorf("must provide a non-zero number of locks")
}
manager := new(InMemoryManager)