From 51f98fadd633b874e579e5f41acacae670cc44df Mon Sep 17 00:00:00 2001 From: Naveen Mahalingam Date: Wed, 27 Nov 2024 12:05:34 -0800 Subject: [PATCH] change reflect.Pointer to reflect.Ptr (legacy) --- table/util.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/table/util.go b/table/util.go index d2e8abf..b3082dc 100644 --- a/table/util.go +++ b/table/util.go @@ -73,7 +73,7 @@ func objAsSlice(in interface{}) []interface{} { if in != nil { // dereference pointers val := reflect.ValueOf(in) - if val.Kind() == reflect.Pointer && !val.IsNil() { + if val.Kind() == reflect.Ptr && !val.IsNil() { in = val.Elem().Interface() } @@ -82,7 +82,7 @@ func objAsSlice(in interface{}) []interface{} { for i := 0; i < v.Len(); i++ { // dereference pointers v2 := v.Index(i) - if v2.Kind() == reflect.Pointer && !v2.IsNil() { + if v2.Kind() == reflect.Ptr && !v2.IsNil() { v2 = reflect.ValueOf(v2.Elem().Interface()) } @@ -103,7 +103,7 @@ func objAsSlice(in interface{}) []interface{} { // remove trailing nil pointers for i := len(out) - 1; i >= 0; i-- { val := reflect.ValueOf(out[i]) - if val.Kind() == reflect.Pointer && val.IsNil() { + if val.Kind() == reflect.Ptr && val.IsNil() { out = out[:i] } else { break