Cleanup: enable lint of revive(superfluous-else)
Signed-off-by: Lan Liang <gcslyp@gmail.com>
This commit is contained in:
parent
c218f93ce3
commit
59cd00d942
|
@ -66,6 +66,9 @@ linters-settings:
|
|||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return
|
||||
- name: if-return
|
||||
disabled: true
|
||||
- name: superfluous-else
|
||||
arguments:
|
||||
- preserveScope
|
||||
staticcheck:
|
||||
checks:
|
||||
- all
|
||||
|
|
|
@ -285,10 +285,9 @@ func readHTTPWithRetries(get httpget, duration time.Duration, u string, attempts
|
|||
if statusCode >= 500 && statusCode < 600 {
|
||||
// Retry 500's
|
||||
continue
|
||||
} else {
|
||||
// Don't retry other StatusCodes
|
||||
break
|
||||
}
|
||||
// Don't retry other StatusCodes
|
||||
break
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -77,9 +77,8 @@ func WaitFederatedResourceQuotaCollectStatus(client karmada.Interface, namespace
|
|||
matched = true
|
||||
if reflect.DeepEqual(assign.Hard, aggregated.Hard) {
|
||||
break
|
||||
} else {
|
||||
return false, nil
|
||||
}
|
||||
return false, nil
|
||||
}
|
||||
if !matched {
|
||||
return false, nil
|
||||
|
|
Loading…
Reference in New Issue