Change reflect.Ptr to reflect.Pointer

Kubernetes-commit: df168d5b5c2dab7414fc00ead1a51257ec326a98
This commit is contained in:
21kyu 2022-06-26 01:23:43 +09:00 committed by Kubernetes Publisher
parent def11f92a6
commit 0bf778323e
4 changed files with 4 additions and 4 deletions

View File

@ -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()
}

View File

@ -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()
}

View File

@ -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()
}

View File

@ -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