jmattheis / goverter

Generate type-safe Go converters by simply defining an interface
https://goverter.jmattheis.de/
MIT License
487 stars 46 forks source link

how about convert A to B with a conditon? #81

Closed xiaopanlaile639 closed 1 year ago

xiaopanlaile639 commented 1 year ago

hello, I am wondering if goverter can convert struct A to struct B with a condition. That's is to say, the tool will determine whether a field in the A structure is finally converted into a field in the B structure according to a condition .

jmattheis commented 1 year ago

Could you post an example with code of what you are trying to achieve?