Skip to content

Commit

Permalink
Merge pull request #110788 from 21kyu/change_reflect_ptr
Browse files Browse the repository at this point in the history
Change reflect.Ptr to reflect.Pointer

Kubernetes-commit: 10810ab42bc8acde6732feae545aa34a09ecd299
  • Loading branch information
k8s-publishing-bot committed Jun 27, 2022
2 parents def11f9 + 0bf7783 commit dad7825
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ require (
golang.org/x/sys v0.0.0-20220209214540-3681064d5158
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.0.0-20220623035010-b98f264fe39f
k8s.io/apimachinery v0.0.0-20220623034752-e74e8a902ca4
k8s.io/cli-runtime v0.0.0-20220623041751-84e34d4bb5e6
k8s.io/client-go v0.0.0-20220623035328-8dfe88aeffaa
k8s.io/component-base v0.0.0-20220623035952-b6b539be163f
k8s.io/apimachinery v0.0.0-20220627171659-66bbc5043e26
k8s.io/cli-runtime v0.0.0-20220627201224-f94bba323eab
k8s.io/client-go v0.0.0-20220627195245-f5b6af45630a
k8s.io/component-base v0.0.0-20220627195835-52746bc9b0f1
k8s.io/component-helpers v0.0.0-20220623040108-86c57e065334
k8s.io/klog/v2 v2.70.0
k8s.io/kube-openapi v0.0.0-20220603121420-31174f50af60
Expand Down Expand Up @@ -98,11 +98,11 @@ require (

replace (
k8s.io/api => k8s.io/api v0.0.0-20220623035010-b98f264fe39f
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220623034752-e74e8a902ca4
k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20220623041751-84e34d4bb5e6
k8s.io/client-go => k8s.io/client-go v0.0.0-20220623035328-8dfe88aeffaa
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220627171659-66bbc5043e26
k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20220627201224-f94bba323eab
k8s.io/client-go => k8s.io/client-go v0.0.0-20220627195245-f5b6af45630a
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20220623034541-068d9f81c4ad
k8s.io/component-base => k8s.io/component-base v0.0.0-20220623035952-b6b539be163f
k8s.io/component-base => k8s.io/component-base v0.0.0-20220627195835-52746bc9b0f1
k8s.io/component-helpers => k8s.io/component-helpers v0.0.0-20220623040108-86c57e065334
k8s.io/metrics => k8s.io/metrics v0.0.0-20220623041623-1d33a6c8539d
)
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -767,14 +767,14 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/api v0.0.0-20220623035010-b98f264fe39f h1:tRHvh1U4+JXeGOFrwkCwQ8e5LfMRnKO5zH6BjL4PZ/s=
k8s.io/api v0.0.0-20220623035010-b98f264fe39f/go.mod h1:0CMFYhUeETcPvj6rQCSZ1GJZo4Q3HhGrf5nvnCMxQ1s=
k8s.io/apimachinery v0.0.0-20220623034752-e74e8a902ca4 h1:RJ5M44sqpimFE3ZnnigbjBTo/Au7o89ijTVcrxzNhvU=
k8s.io/apimachinery v0.0.0-20220623034752-e74e8a902ca4/go.mod h1:h34FtK3eCxige6ZIACdBSYExtDaKAUxoc7hVe2LOxzw=
k8s.io/cli-runtime v0.0.0-20220623041751-84e34d4bb5e6 h1:u/jLTaABZ+3is1iu5PeiarA/bt0FKbAUZPpA15nPpGo=
k8s.io/cli-runtime v0.0.0-20220623041751-84e34d4bb5e6/go.mod h1:0G3MZRFh8FKFHChn0YFKZgYiOuiKNcEieb+4LDXaLYQ=
k8s.io/client-go v0.0.0-20220623035328-8dfe88aeffaa h1:HT7gfQzYV9iz5YEbRRVuXf0GsAeXgYLddH6QM7ImTek=
k8s.io/client-go v0.0.0-20220623035328-8dfe88aeffaa/go.mod h1:JPBigEtRme06bb+dnR5imvg69xAQQ+AJYW/EkDPIEw0=
k8s.io/component-base v0.0.0-20220623035952-b6b539be163f h1:KzllFQ9o4JSPimXXjdNxj3DnQi8FzIkqna6qQFDdmvw=
k8s.io/component-base v0.0.0-20220623035952-b6b539be163f/go.mod h1:IeTTO/NTd+tU+kNoBqc8wTHEmzFM6xIGSH2tctajOas=
k8s.io/apimachinery v0.0.0-20220627171659-66bbc5043e26 h1:oGbjYEdKcJS45hhsYkdSKgaWGgHEgV65OJ/jNUbHIOo=
k8s.io/apimachinery v0.0.0-20220627171659-66bbc5043e26/go.mod h1:h34FtK3eCxige6ZIACdBSYExtDaKAUxoc7hVe2LOxzw=
k8s.io/cli-runtime v0.0.0-20220627201224-f94bba323eab h1:m8utcf8FQRcrvo5ocsAxQtYWWvBhplo6ab8ckU5ZGoM=
k8s.io/cli-runtime v0.0.0-20220627201224-f94bba323eab/go.mod h1:qT9b54kSlv5mQ6KOJ3q9h2lSbNXIOqtqZD2dzJ/K5jc=
k8s.io/client-go v0.0.0-20220627195245-f5b6af45630a h1:J9/m9C1gWOhBVK8tAhRVFdZVFEW9KbQbEnJNbDZC0ec=
k8s.io/client-go v0.0.0-20220627195245-f5b6af45630a/go.mod h1:x7CjHKWPwqc7sbfk+czdMM7waLVJzSG75YE9aaMZFWU=
k8s.io/component-base v0.0.0-20220627195835-52746bc9b0f1 h1:zIHTdt1KrK9UC4Rbs4pw/N5im7hlDgEJ/g+rBWCiEyc=
k8s.io/component-base v0.0.0-20220627195835-52746bc9b0f1/go.mod h1:BKBMH9RfJ4DrSbln2SL1NfVHdI6xf2X8RzfjjrrC1Qs=
k8s.io/component-helpers v0.0.0-20220623040108-86c57e065334 h1:DDzWzRm40on2gv0Kv6Y/hXVlcTRFotS0i81nwumfc9A=
k8s.io/component-helpers v0.0.0-20220623040108-86c57e065334/go.mod h1:4tiTf70yxyi2TAKRg+OdSbYDS2tMyxmsYDuB3uhm4FE=
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/config/navigation_step_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/config/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/get/sorter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dad7825

Please sign in to comment.