Skip to content

Commit

Permalink
Merge pull request kubernetes#119321 from mingregister/mingregister-p…
Browse files Browse the repository at this point in the history
…atch-1

replace strings.Index  with strings.Contains
  • Loading branch information
k8s-ci-robot committed Jul 18, 2023
2 parents f42ff86 + 0378470 commit b2a9c06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion staging/src/k8s.io/apiserver/pkg/endpoints/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
requestScope = "resource"
operationSuffix = operationSuffix + "WithPath"
}
if strings.Index(action.Path, "/{name}") != -1 || action.Verb == "POST" {
if strings.Contains(action.Path, "/{name}") || action.Verb == "POST" {
requestScope = "resource"
}
if action.AllNamespaces {
Expand Down

0 comments on commit b2a9c06

Please sign in to comment.