Merge pull request #74124 from truongnh1992/fix-typo

Correcting error on source codes
pull/564/head
Kubernetes Prow Robot 2019-02-18 20:16:46 -08:00 committed by GitHub
commit de2ceac50d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -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 {

View File

@ -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]

View File

@ -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)