From b873cbbed585805ee285a66d26974f8181e338a1 Mon Sep 17 00:00:00 2001 From: Taesun Lee Date: Mon, 24 Feb 2020 00:06:09 +0900 Subject: [PATCH] Fix: pkg/apis Typos in comments, function name, error message poicy -> policy varialbes -> variables exeuction -> execution Resaurces -> Resources TestSetDefaulEndpointsProtocol -> TestSetDefaultEndpointsProtocol TestSetDefaulServiceTargetPort -> TestSetDefaultServiceTargetPort TestSetDefaulServiceExternalTraffic -> TestSetDefaultServiceExternalTraffic --- pkg/apis/core/v1/defaults_test.go | 8 ++++---- pkg/apis/core/v1/register.go | 2 +- pkg/apis/flowcontrol/validation/validation.go | 2 +- pkg/apis/rbac/helpers.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/apis/core/v1/defaults_test.go b/pkg/apis/core/v1/defaults_test.go index 9761b67b17f..7e48d6a245a 100644 --- a/pkg/apis/core/v1/defaults_test.go +++ b/pkg/apis/core/v1/defaults_test.go @@ -608,7 +608,7 @@ func TestSetDefaultReplicationControllerInitContainers(t *testing.T) { assertImagePullPolicy := func(got, expected *v1.Container) error { if got.ImagePullPolicy != expected.ImagePullPolicy { - return fmt.Errorf("different image pull poicy: got <%v>, expected <%v>", got.ImagePullPolicy, expected.ImagePullPolicy) + return fmt.Errorf("different image pull policy: got <%v>, expected <%v>", got.ImagePullPolicy, expected.ImagePullPolicy) } return nil } @@ -1375,7 +1375,7 @@ func TestSetDefaultPersistentVolumeClaim(t *testing.T) { } } -func TestSetDefaulEndpointsProtocol(t *testing.T) { +func TestSetDefaultEndpointsProtocol(t *testing.T) { in := &v1.Endpoints{Subsets: []v1.EndpointSubset{ {Ports: []v1.EndpointPort{{}, {Protocol: "UDP"}, {}}}, }} @@ -1397,7 +1397,7 @@ func TestSetDefaulEndpointsProtocol(t *testing.T) { } } -func TestSetDefaulServiceTargetPort(t *testing.T) { +func TestSetDefaultServiceTargetPort(t *testing.T) { in := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{Port: 1234}}}} obj := roundTrip(t, runtime.Object(in)) out := obj.(*v1.Service) @@ -1457,7 +1457,7 @@ func TestSetDefaultServicePort(t *testing.T) { } } -func TestSetDefaulServiceExternalTraffic(t *testing.T) { +func TestSetDefaultServiceExternalTraffic(t *testing.T) { in := &v1.Service{} obj := roundTrip(t, runtime.Object(in)) out := obj.(*v1.Service) diff --git a/pkg/apis/core/v1/register.go b/pkg/apis/core/v1/register.go index b446b7ea507..adf620fa4fd 100644 --- a/pkg/apis/core/v1/register.go +++ b/pkg/apis/core/v1/register.go @@ -33,7 +33,7 @@ func init() { localSchemeBuilder.Register(addDefaultingFuncs, addConversionFuncs) } -// TODO: remove these global varialbes +// TODO: remove these global variables // GroupName is the group name use in this package const GroupName = "" diff --git a/pkg/apis/flowcontrol/validation/validation.go b/pkg/apis/flowcontrol/validation/validation.go index d0aa1e311f9..e24e4cb9f00 100644 --- a/pkg/apis/flowcontrol/validation/validation.go +++ b/pkg/apis/flowcontrol/validation/validation.go @@ -382,7 +382,7 @@ func ValidatePriorityLevelConfigurationSpec(spec *flowcontrol.PriorityLevelConfi return allErrs } -// ValidateLimitedPriorityLevelConfiguration validates the configuration for an exeuction-limited priority level +// ValidateLimitedPriorityLevelConfiguration validates the configuration for an execution-limited priority level func ValidateLimitedPriorityLevelConfiguration(lplc *flowcontrol.LimitedPriorityLevelConfiguration, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList if lplc.AssuredConcurrencyShares <= 0 { diff --git a/pkg/apis/rbac/helpers.go b/pkg/apis/rbac/helpers.go index 90c7e02e63c..00aa4cae17a 100644 --- a/pkg/apis/rbac/helpers.go +++ b/pkg/apis/rbac/helpers.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" ) -// ResourceMatches returns the result of the rule.Resaurces matching. +// ResourceMatches returns the result of the rule.Resources matching. func ResourceMatches(rule *PolicyRule, combinedRequestedResource, requestedSubresource string) bool { for _, ruleResource := range rule.Resources { // if everything is allowed, we match