Closed yxu1111 closed 10 months ago
Thanks for the report, could you try out the map-nil
branch and verify the problem is fixed for you?
go install github.com/jmattheis/goverter/cmd/goverter@map-nil
go run github.com/jmattheis/goverter/cmd/goverter@map-nil [pattern]
go get github.com/jmattheis/goverter@map-nil
yes, it works great! Thank you for your in-time response and quick fix!
Describe the bug A nil map is always converted to an empty map ({}) which sometimes could cause issues if the caller treats them differently
To Reproduce pass in a member variable that is a map of value nil will return a map of value '{}'
Expected behavior Ideally it should keep the original behavior - nil to nil and {} to {}
Thanks!