Closed NicklasWallgren closed 1 year ago
Fixes https://github.com/jinzhu/copier/issues/99
An alternative to using defer/recover is to utilize the FieldByIndexErr, but it's only available in 1.18+
FieldByIndexErr
structField, ok := source.Type().FieldByName(fieldName) if !ok { return reflect.Value{} } field, err := source.FieldByIndexErr(structField.Index) if err != nil { return reflect.Value{} } return field
Hi @NicklasWallgren can you fix those conflicts?
@jinzhu Sure, I've rebased with master.
Fixes https://github.com/jinzhu/copier/issues/99
An alternative to using defer/recover is to utilize the
FieldByIndexErr
, but it's only available in 1.18+