diff --git a/go.work.sum b/go.work.sum index b100585..5d260c0 100644 --- a/go.work.sum +++ b/go.work.sum @@ -14,6 +14,7 @@ golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= diff --git a/internal/pq/array.go b/internal/pq/array.go index 471274b..666ed4f 100644 --- a/internal/pq/array.go +++ b/internal/pq/array.go @@ -355,7 +355,7 @@ func (GenericArray) evaluateDestination(rt reflect.Type) (reflect.Type, func([]b // TODO calculate the assign function for other types // TODO repeat this section on the element type of arrays or slices (multidimensional) { - if reflect.PtrTo(rt).Implements(typeSQLScanner) { + if reflect.PointerTo(rt).Implements(typeSQLScanner) { // dest is always addressable because it is an element of a slice. assign = func(src []byte, dest reflect.Value) (err error) { ss := dest.Addr().Interface().(sql.Scanner) @@ -387,7 +387,7 @@ FoundType: func (a GenericArray) Scan(src any) error { dpv := reflect.ValueOf(a.A) switch { - case dpv.Kind() != reflect.Ptr: + case dpv.Kind() != reflect.Pointer: return fmt.Errorf("pq: destination %T is not a pointer to array or slice", a.A) case dpv.IsNil(): return fmt.Errorf("pq: destination %T is nil", a.A) diff --git a/json.go b/json.go index f11e5d9..ae9045f 100644 --- a/json.go +++ b/json.go @@ -22,18 +22,18 @@ func CanMarshalJSON(t reflect.Type) bool { return true } kind := t.Kind() - if kind != reflect.Ptr && reflect.PtrTo(t).Implements(jsonMarshalerType) { + if kind != reflect.Pointer && reflect.PointerTo(t).Implements(jsonMarshalerType) { return true } if t.Implements(textMarshalerType) { return true } - if kind != reflect.Ptr && reflect.PtrTo(t).Implements(textMarshalerType) { + if kind != reflect.Pointer && reflect.PointerTo(t).Implements(textMarshalerType) { return true } - if kind == reflect.Ptr { + if kind == reflect.Pointer { t = t.Elem() kind = t.Kind() } diff --git a/nullable/nullable.go b/nullable/nullable.go index f9c5baa..a605fde 100644 --- a/nullable/nullable.go +++ b/nullable/nullable.go @@ -21,7 +21,7 @@ type Zeroable interface { // with true returned for the zero value of reflect.Value. func ReflectIsNull(v reflect.Value) bool { switch v.Kind() { - case reflect.Ptr: + case reflect.Pointer: if v.IsNil() { return true } diff --git a/strfmt/scan.go b/strfmt/scan.go index 98c4acf..326f61a 100644 --- a/strfmt/scan.go +++ b/strfmt/scan.go @@ -25,7 +25,7 @@ func Scan(dest reflect.Value, source string, config *ScanConfig) (err error) { return scaner.ScanString(dest, source, config) } - if dest.Kind() == reflect.Ptr { + if dest.Kind() == reflect.Pointer { if config.IsNil(source) { // If dest is a pointer type and source is a nil string // then set pointer to nil (the zero value of the pointer)