revert to Ptr

This commit is contained in:
Alexei Melnic 2022-04-20 13:54:04 +03:00
parent bd5ea93897
commit 98b9a1a85b

View File

@ -528,7 +528,7 @@ func (field *Field) setupValuerAndSetter() {
reflectValType := reflectV.Type()
if reflectValType.AssignableTo(field.FieldType) {
if reflectV.Kind() == reflect.Pointer && reflectV.Elem().Kind() == reflect.Pointer {
if reflectV.Kind() == reflect.Ptr && reflectV.Elem().Kind() == reflect.Ptr {
reflectV = reflect.Indirect(reflectV)
}
field.ReflectValueOf(ctx, value).Set(reflectV)