simplify returning boolean expression in staging/src/k8s.io/client-go/tools

Signed-off-by: 刁浩 10284789 <diao.hao@zte.com.cn>

Kubernetes-commit: 9173414da6d1c70436b256d6068e3737a7434f6a
This commit is contained in:
刁浩 10284789
2021-05-24 07:15:36 +00:00
committed by Kubernetes Publisher
parent 614c59d0d6
commit 5b0c7191ef
4 changed files with 4 additions and 18 deletions

View File

@@ -36,9 +36,5 @@ func ValidateEventType(eventtype string) bool {
func IsKeyNotFoundError(err error) bool {
statusErr, _ := err.(*errors.StatusError)
if statusErr != nil && statusErr.Status().Code == http.StatusNotFound {
return true
}
return false
return statusErr != nil && statusErr.Status().Code == http.StatusNotFound
}