Fix last remaining SA5011 error by removing unnecessary r != nil check

This commit is contained in:
Hanna Lee 2021-07-15 17:38:43 -04:00 committed by Antonio Ojea
parent a7daeb37af
commit c862d7c0e9

View File

@ -808,10 +808,9 @@ func getEtcdVersionResponse(client *http.Client, url string, target interface{})
loopCount--
return false, err
}
//lint:ignore SA5011 If err != nil we are already returning.
defer r.Body.Close()
if r != nil && r.StatusCode >= 500 && r.StatusCode <= 599 {
if r.StatusCode >= 500 && r.StatusCode <= 599 {
loopCount--
return false, errors.Errorf("server responded with non-successful status: %s", r.Status)
}