Fix deprecated reflect.PtrTo calls
This commit is contained in:
@@ -79,7 +79,7 @@ func _getDecoder(typ reflect.Type) decoderFunc {
|
||||
|
||||
// Addressable struct field value.
|
||||
if kind != reflect.Ptr {
|
||||
ptr := reflect.PtrTo(typ)
|
||||
ptr := reflect.PointerTo(typ)
|
||||
if ptr.Implements(customDecoderType) {
|
||||
return addrDecoder(nilAwareDecoder(typ, decodeCustomValue))
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ func _getEncoder(typ reflect.Type) encoderFunc {
|
||||
|
||||
// Addressable struct field value.
|
||||
if kind != reflect.Ptr {
|
||||
ptr := reflect.PtrTo(typ)
|
||||
ptr := reflect.PointerTo(typ)
|
||||
if ptr.Implements(customEncoderType) {
|
||||
return encodeCustomValuePtr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user