Open jmattheis opened 1 month ago
Is there also a general use case for supporting factory functions to provide the target instance?
@dhirajsb Could you create a new ticket with a use case? I don't want to fill this ticket with not closely related requests.
Currently goverter always instantiates the target type itself. Sometimes there is already an instance of the target type and you just want to copy the source fields to the target field. Example:
Mapstruct has similar functionality:
https://mapstruct.org/documentation/1.5/reference/html/#updating-bean-instances
See https://github.com/jmattheis/goverter/issues/146#issuecomment-2161457915 for another use-case.
Please :+1: this issue if you want this functionality. If you have a specific use-case in mind, feel free to comment it.