trivial fix typo: resouce -> resource
Although it is spelling mistakes, it might make an affects while reading. Signed-off-by: Nguyen Hai Truong <truongnh@vn.fujitsu.com>
This commit is contained in:
parent
9f3b4b588d
commit
34961dc16c
@ -47,7 +47,7 @@ func validateResources(resources []string, fldPath *field.Path) field.ErrorList
|
|||||||
// */x
|
// */x
|
||||||
resourcesWithWildcardSubresoures := sets.String{}
|
resourcesWithWildcardSubresoures := sets.String{}
|
||||||
// x/*
|
// x/*
|
||||||
subResoucesWithWildcardResource := sets.String{}
|
subResourcesWithWildcardResource := sets.String{}
|
||||||
// */*
|
// */*
|
||||||
hasDoubleWildcard := false
|
hasDoubleWildcard := false
|
||||||
// *
|
// *
|
||||||
@ -75,14 +75,14 @@ func validateResources(resources []string, fldPath *field.Path) field.ErrorList
|
|||||||
if _, ok := resourcesWithWildcardSubresoures[res]; ok {
|
if _, ok := resourcesWithWildcardSubresoures[res]; ok {
|
||||||
allErrors = append(allErrors, field.Invalid(fldPath.Index(i), resSub, fmt.Sprintf("if '%s/*' is present, must not specify %s", res, resSub)))
|
allErrors = append(allErrors, field.Invalid(fldPath.Index(i), resSub, fmt.Sprintf("if '%s/*' is present, must not specify %s", res, resSub)))
|
||||||
}
|
}
|
||||||
if _, ok := subResoucesWithWildcardResource[sub]; ok {
|
if _, ok := subResourcesWithWildcardResource[sub]; ok {
|
||||||
allErrors = append(allErrors, field.Invalid(fldPath.Index(i), resSub, fmt.Sprintf("if '*/%s' is present, must not specify %s", sub, resSub)))
|
allErrors = append(allErrors, field.Invalid(fldPath.Index(i), resSub, fmt.Sprintf("if '*/%s' is present, must not specify %s", sub, resSub)))
|
||||||
}
|
}
|
||||||
if sub == "*" {
|
if sub == "*" {
|
||||||
resourcesWithWildcardSubresoures[res] = struct{}{}
|
resourcesWithWildcardSubresoures[res] = struct{}{}
|
||||||
}
|
}
|
||||||
if res == "*" {
|
if res == "*" {
|
||||||
subResoucesWithWildcardResource[sub] = struct{}{}
|
subResourcesWithWildcardResource[sub] = struct{}{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(resources) > 1 && hasDoubleWildcard {
|
if len(resources) > 1 && hasDoubleWildcard {
|
||||||
|
@ -159,7 +159,7 @@ func extractVmssCacheKey(key string) (string, string, error) {
|
|||||||
// key is composed of <resourceGroup>#<vmName>
|
// key is composed of <resourceGroup>#<vmName>
|
||||||
keyItems := strings.Split(key, vmssCacheSeparator)
|
keyItems := strings.Split(key, vmssCacheSeparator)
|
||||||
if len(keyItems) != 2 {
|
if len(keyItems) != 2 {
|
||||||
return "", "", fmt.Errorf("key %q is not in format '<resouceGroup>#<vmName>'", key)
|
return "", "", fmt.Errorf("key %q is not in format '<resourceGroup>#<vmName>'", key)
|
||||||
}
|
}
|
||||||
|
|
||||||
resourceGroup := keyItems[0]
|
resourceGroup := keyItems[0]
|
||||||
|
@ -21,7 +21,7 @@ import (
|
|||||||
"k8s.io/client-go/discovery"
|
"k8s.io/client-go/discovery"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CategoryExpander maps category strings to GroupResouces.
|
// CategoryExpander maps category strings to GroupResources.
|
||||||
// Categories are classification or 'tag' of a group of resources.
|
// Categories are classification or 'tag' of a group of resources.
|
||||||
type CategoryExpander interface {
|
type CategoryExpander interface {
|
||||||
Expand(category string) ([]schema.GroupResource, bool)
|
Expand(category string) ([]schema.GroupResource, bool)
|
||||||
|
Loading…
Reference in New Issue
Block a user