mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-16 07:13:53 +00:00
replace strings.Index with strings.Contains instead
replace strings.Index() !=-1 with strings.Contains instead
This commit is contained in:
parent
e3bc35bc1b
commit
037847066c
@ -711,7 +711,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
Block a user