mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
cleanup: use sets.Len() insead of len(sets.List())
This commit is contained in:
parent
303f47c0c0
commit
80b43075c9
@ -88,7 +88,7 @@ func (o *BuiltInAuthorizationOptions) Validate() []error {
|
|||||||
allErrors = append(allErrors, fmt.Errorf("cannot specify --authorization-webhook-config-file without mode Webhook"))
|
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))
|
allErrors = append(allErrors, fmt.Errorf("authorization-mode %q has mode specified more than once", o.Modes))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user