jmattheis / goverter

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

Fix BasicTargetPointer handling to not assign Go zero values to pointers #153

Closed childsev closed 2 months ago

childsev commented 2 months ago

This is a sample fix for the issue I proposed here: https://github.com/jmattheis/goverter/issues/152.

It enables Goverter to check whether a value is set to Go zero-value of primitives before setting the underlying value of a pointer in destination structs

jmattheis commented 2 months ago

See https://github.com/jmattheis/goverter/issues/152#issuecomment-2225174093