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