Merge pull request #101403 from wangyx1992/redundant-silce-nilcheck
cleanup: omit redundant nil check around loop in apiserver
This commit is contained in:
@@ -669,7 +669,6 @@ func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if s.APIEnablement.RuntimeConfig != nil {
|
||||
for key, value := range s.APIEnablement.RuntimeConfig {
|
||||
if key == "v1" || strings.HasPrefix(key, "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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
options.ServerRunOptions = s
|
||||
return options, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user