This patch consists of various corrections. (#73060)

* This patch consists of various corrections.

*) Remove unwanted `else` code block
*) Adjust variable intialization.
*) Correct error strings.
*) Use recommended variable increment method.

Signed-off-by: hchiramm <hchiramm@redhat.com>

* Remove cluster/images/cluster-version-monitor from hack/.golint_failures.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Devassy Chirammal
2019-01-23 01:58:59 +05:30
committed by Kubernetes Prow Robot
parent e1e85f947e
commit 2651c72166
6 changed files with 11 additions and 12 deletions

View File

@@ -593,9 +593,9 @@ func (r RealPodControl) DeletePod(namespace string, podID string, object runtime
if err := r.KubeClient.CoreV1().Pods(namespace).Delete(podID, nil); err != nil && !apierrors.IsNotFound(err) {
r.Recorder.Eventf(object, v1.EventTypeWarning, FailedDeletePodReason, "Error deleting: %v", err)
return fmt.Errorf("unable to delete pods: %v", err)
} else {
r.Recorder.Eventf(object, v1.EventTypeNormal, SuccessfulDeletePodReason, "Deleted pod: %v", podID)
}
r.Recorder.Eventf(object, v1.EventTypeNormal, SuccessfulDeletePodReason, "Deleted pod: %v", podID)
return nil
}