Skip to content

Commit

Permalink
Merge pull request kubernetes#74124 from truongnh1992/fix-typo
Browse files Browse the repository at this point in the history
Correcting error on source codes
  • Loading branch information
k8s-ci-robot authored Feb 19, 2019
2 parents aaf479f + 34961dc commit de2ceac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pkg/apis/admissionregistration/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
// *
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudprovider/providers/azure/azure_vmss_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit de2ceac

Please sign in to comment.