mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 04:52:08 +00:00
Merge pull request #119321 from mingregister/mingregister-patch-1
replace strings.Index with strings.Contains
This commit is contained in:
commit
b2a9c06b2e
@ -714,7 +714,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
|
|||||||
requestScope = "resource"
|
requestScope = "resource"
|
||||||
operationSuffix = operationSuffix + "WithPath"
|
operationSuffix = operationSuffix + "WithPath"
|
||||||
}
|
}
|
||||||
if strings.Index(action.Path, "/{name}") != -1 || action.Verb == "POST" {
|
if strings.Contains(action.Path, "/{name}") || action.Verb == "POST" {
|
||||||
requestScope = "resource"
|
requestScope = "resource"
|
||||||
}
|
}
|
||||||
if action.AllNamespaces {
|
if action.AllNamespaces {
|
||||||
|
Loading…
Reference in New Issue
Block a user