Merge pull request #73917 from droslean/cleanup

replace loops with go idiomatic.
This commit is contained in:
Kubernetes Prow Robot
2019-03-19 19:01:04 -07:00
committed by GitHub
9 changed files with 7 additions and 26 deletions

View File

@@ -109,9 +109,7 @@ func getScopeSelectorsFromQuota(quota *corev1.ResourceQuota) []corev1.ScopedReso
Operator: corev1.ScopeSelectorOpExists})
}
if quota.Spec.ScopeSelector != nil {
for _, scopeSelector := range quota.Spec.ScopeSelector.MatchExpressions {
selectors = append(selectors, scopeSelector)
}
selectors = append(selectors, quota.Spec.ScopeSelector.MatchExpressions...)
}
return selectors
}