mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
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:
commit
85e7ddbcfb
@ -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))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user