mirror of https://github.com/k3s-io/k3s
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>pull/564/head
parent
9f3b4b588d
commit
34961dc16c
|
@ -47,7 +47,7 @@ func validateResources(resources []string, fldPath *field.Path) field.ErrorList
|
|||
// */x
|
||||
resourcesWithWildcardSubresoures := sets.String{}
|
||||
// x/*
|
||||
subResoucesWithWildcardResource := sets.String{}
|
||||
subResourcesWithWildcardResource := sets.String{}
|
||||
// */*
|
||||
hasDoubleWildcard := false
|
||||
// *
|
||||
|
@ -75,14 +75,14 @@ func validateResources(resources []string, fldPath *field.Path) field.ErrorList
|
|||
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)))
|
||||
}
|
||||
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)))
|
||||
}
|
||||
if sub == "*" {
|
||||
resourcesWithWildcardSubresoures[res] = struct{}{}
|
||||
}
|
||||
if res == "*" {
|
||||
subResoucesWithWildcardResource[sub] = struct{}{}
|
||||
subResourcesWithWildcardResource[sub] = struct{}{}
|
||||
}
|
||||
}
|
||||
if len(resources) > 1 && hasDoubleWildcard {
|
||||
|
|
|
@ -159,7 +159,7 @@ func extractVmssCacheKey(key string) (string, string, error) {
|
|||
// key is composed of <resourceGroup>#<vmName>
|
||||
keyItems := strings.Split(key, vmssCacheSeparator)
|
||||
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]
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
"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.
|
||||
type CategoryExpander interface {
|
||||
Expand(category string) ([]schema.GroupResource, bool)
|
||||
|
|
Loading…
Reference in New Issue