Browse Source

Go 1.16 compatibility. See #402.

Dmitry Panov 3 years ago
parent
commit
c4d370b87b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      object_goreflect.go

+ 1 - 1
object_goreflect.go

@@ -154,7 +154,7 @@ func (o *objectGoReflect) init() {
 	// Always use pointer type for non-interface values to be able to access both methods defined on
 	// Always use pointer type for non-interface values to be able to access both methods defined on
 	// the literal type and on the pointer.
 	// the literal type and on the pointer.
 	if o.fieldsValue.Kind() != reflect.Interface {
 	if o.fieldsValue.Kind() != reflect.Interface {
-		methodsType = reflect.PointerTo(o.fieldsValue.Type())
+		methodsType = reflect.PtrTo(o.fieldsValue.Type())
 	} else {
 	} else {
 		methodsType = o.fieldsValue.Type()
 		methodsType = o.fieldsValue.Type()
 	}
 	}