From b6557babf277819b07bb512fec90ede8b069a24d Mon Sep 17 00:00:00 2001 From: Hai Huang Date: Sat, 16 Apr 2016 10:18:43 -0400 Subject: [PATCH] minor comment and code fixes --- pkg/quota/generic/evaluator.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/quota/generic/evaluator.go b/pkg/quota/generic/evaluator.go index 905590e4a8c..629b6fed713 100644 --- a/pkg/quota/generic/evaluator.go +++ b/pkg/quota/generic/evaluator.go @@ -48,8 +48,8 @@ func MatchesNoScopeFunc(scope api.ResourceQuotaScope, object runtime.Object) boo return false } -// ObjectCountConstraintsFunc returns true if the specified resource name is in -// the required set of resource names +// ObjectCountConstraintsFunc returns ConstraintsFunc that returns nil if the +// specified resource name is in the required set of resource names func ObjectCountConstraintsFunc(resourceName api.ResourceName) ConstraintsFunc { return func(required []api.ResourceName, item runtime.Object) error { if !quota.Contains(required, resourceName) { @@ -133,6 +133,7 @@ func (g *GenericEvaluator) Matches(resourceQuota *api.ResourceQuota, item runtim for resourceName := range resourceQuota.Status.Hard { if g.MatchesResource(resourceName) { matchResource = true + break } } // by default, no scopes matches all