Merge pull request #111313 from BinacsLee/binacs/use-len-in-options

cleanup: use sets.Len() insead of len(sets.List())
This commit is contained in:
Kubernetes Prow Robot
2022-10-04 07:34:16 -07:00
committed by GitHub

View File

@@ -88,7 +88,7 @@ func (o *BuiltInAuthorizationOptions) Validate() []error {
allErrors = append(allErrors, fmt.Errorf("cannot specify --authorization-webhook-config-file without mode Webhook"))
}
if len(o.Modes) != len(modes.List()) {
if len(o.Modes) != modes.Len() {
allErrors = append(allErrors, fmt.Errorf("authorization-mode %q has mode specified more than once", o.Modes))
}