Skip to content

Commit

Permalink
Change reflect.Ptr to reflect.Pointer
Browse files Browse the repository at this point in the history
Kubernetes-commit: df168d5b5c2dab7414fc00ead1a51257ec326a98
  • Loading branch information
wqld authored and k8s-publishing-bot committed Jun 25, 2022
1 parent def11f9 commit 0bf7783
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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 0bf7783

Please sign in to comment.