mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #101403 from wangyx1992/redundant-silce-nilcheck
cleanup: omit redundant nil check around loop in apiserver
This commit is contained in:
commit
fbc93bd34c
@ -669,7 +669,6 @@ func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.APIEnablement.RuntimeConfig != nil {
|
|
||||||
for key, value := range s.APIEnablement.RuntimeConfig {
|
for key, value := range s.APIEnablement.RuntimeConfig {
|
||||||
if key == "v1" || strings.HasPrefix(key, "v1/") ||
|
if key == "v1" || strings.HasPrefix(key, "v1/") ||
|
||||||
key == "api/v1" || strings.HasPrefix(key, "api/v1/") {
|
key == "api/v1" || strings.HasPrefix(key, "api/v1/") {
|
||||||
@ -680,7 +679,7 @@ func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) {
|
|||||||
delete(s.APIEnablement.RuntimeConfig, key)
|
delete(s.APIEnablement.RuntimeConfig, key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
options.ServerRunOptions = s
|
options.ServerRunOptions = s
|
||||||
return options, nil
|
return options, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user