replace strings.Index with strings.Contains instead
replace strings.Index() !=-1 with strings.Contains instead Kubernetes-commit: 037847066ce7ebb622c4b207355ac97814414841
This commit is contained in:
parent
8e2b0eca2e
commit
e6c3a57fb9
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue