Skip to content

Nil-pointers fixes

Latest
Compare
Choose a tag to compare
@livingsilver94 livingsilver94 released this 26 Jan 11:14
· 4 commits to main since this release

v1.1.1 Fixes marshaling and unmarshaling pointer fields with nil value. Marshaling was straight panicking, while unmarshaling was setting zero-values when unwanted (i.e., omitempty was not specified).

Now redmap marshals nil-pointers with the underlying type's zero value. While unmarshaling, redmap sets the underlying type's zero value to pointer fields with no key found in the input map, unless omitempty is specified. In that case, the pointer field is left with the nil value.