From 556ff16b0df21b7803386aa00d2497551c2e4d6e Mon Sep 17 00:00:00 2001 From: SataQiu Date: Tue, 16 Apr 2019 07:21:20 +0800 Subject: [PATCH] fix golint failures of pkg/apis/core/helper --- hack/.golint_failures | 1 - pkg/apis/core/helper/helpers.go | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hack/.golint_failures b/hack/.golint_failures index 8d4eb008405..8631dd3775a 100644 --- a/hack/.golint_failures +++ b/hack/.golint_failures @@ -32,7 +32,6 @@ pkg/apis/certificates pkg/apis/certificates/v1beta1 pkg/apis/certificates/validation pkg/apis/core -pkg/apis/core/helper pkg/apis/core/helper/qos pkg/apis/core/v1 pkg/apis/core/v1/helper diff --git a/pkg/apis/core/helper/helpers.go b/pkg/apis/core/helper/helpers.go index f16611d6cba..835e2cbf19b 100644 --- a/pkg/apis/core/helper/helpers.go +++ b/pkg/apis/core/helper/helpers.go @@ -276,10 +276,12 @@ var standardFinalizers = sets.NewString( metav1.FinalizerDeleteDependents, ) +// IsStandardFinalizerName checks if the input string is a standard finalizer name func IsStandardFinalizerName(str string) bool { return standardFinalizers.Has(str) } +// LoadBalancerStatusEqual checks if the status of the load balancer is equal to the target status // TODO: make method on LoadBalancerStatus? func LoadBalancerStatusEqual(l, r *core.LoadBalancerStatus) bool { return ingressSliceEqual(l.Ingress, r.Ingress) @@ -324,7 +326,7 @@ func GetAccessModesAsString(modes []core.PersistentVolumeAccessMode) string { return strings.Join(modesStr, ",") } -// GetAccessModesAsString returns an array of AccessModes from a string created by GetAccessModesAsString +// GetAccessModesFromString returns an array of AccessModes from a string created by GetAccessModesAsString func GetAccessModesFromString(modes string) []core.PersistentVolumeAccessMode { strmodes := strings.Split(modes, ",") accessModes := []core.PersistentVolumeAccessMode{}