From 0bf778323ebd40116c20d021f5d410c6ac9af152 Mon Sep 17 00:00:00 2001 From: 21kyu Date: Sun, 26 Jun 2022 01:23:43 +0900 Subject: [PATCH] Change reflect.Ptr to reflect.Pointer Kubernetes-commit: df168d5b5c2dab7414fc00ead1a51257ec326a98 --- pkg/cmd/config/config_test.go | 2 +- pkg/cmd/config/navigation_step_parser.go | 2 +- pkg/cmd/config/set.go | 2 +- pkg/cmd/get/sorter.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/config/config_test.go b/pkg/cmd/config/config_test.go index 1ca42642c..36c3b494e 100644 --- a/pkg/cmd/config/config_test.go +++ b/pkg/cmd/config/config_test.go @@ -921,7 +921,7 @@ func testClearLocationOfOrigin(config *clientcmdapi.Config) { } func testSetNilMapsToEmpties(curr reflect.Value) { actualCurrValue := curr - if curr.Kind() == reflect.Ptr { + if curr.Kind() == reflect.Pointer { actualCurrValue = curr.Elem() } diff --git a/pkg/cmd/config/navigation_step_parser.go b/pkg/cmd/config/navigation_step_parser.go index 59587ddb9..cc3ca5bfa 100644 --- a/pkg/cmd/config/navigation_step_parser.go +++ b/pkg/cmd/config/navigation_step_parser.go @@ -115,7 +115,7 @@ func findNameStep(parts []string, typeOptions sets.String) string { // getPotentialTypeValues takes a type and looks up the tags used to represent its fields when serialized. func getPotentialTypeValues(typeValue reflect.Type) (map[string]reflect.Type, error) { - if typeValue.Kind() == reflect.Ptr { + if typeValue.Kind() == reflect.Pointer { typeValue = typeValue.Elem() } diff --git a/pkg/cmd/config/set.go b/pkg/cmd/config/set.go index 09d025d99..1031dd99c 100644 --- a/pkg/cmd/config/set.go +++ b/pkg/cmd/config/set.go @@ -145,7 +145,7 @@ func modifyConfig(curr reflect.Value, steps *navigationSteps, propertyValue stri currStep := steps.pop() actualCurrValue := curr - if curr.Kind() == reflect.Ptr { + if curr.Kind() == reflect.Pointer { actualCurrValue = curr.Elem() } diff --git a/pkg/cmd/get/sorter.go b/pkg/cmd/get/sorter.go index 38eff349f..b083bf4dc 100644 --- a/pkg/cmd/get/sorter.go +++ b/pkg/cmd/get/sorter.go @@ -182,7 +182,7 @@ func isLess(i, j reflect.Value) (bool, error) { return i.Float() < j.Float(), nil case reflect.String: return sortorder.NaturalLess(i.String(), j.String()), nil - case reflect.Ptr: + case reflect.Pointer: return isLess(i.Elem(), j.Elem()) case reflect.Struct: // sort metav1.Time