3 ms·
> worst case you're getting that struct with all the fields set to zero, and you just have to handle the zero values In the field I work, zero values are valid
by metaltyphoon 1y ago
> worst case you're getting that struct with all the fields set to zero, and you just have to handle the zero values
In the field I work, zero values are valid and doing it in Go would be a nightmare
- parhamn 1y agoAgreed, the pointer or "<field>_empty: bool" patterns are annoying. Point still stands though, you always get the structure you ask for.
- mjevans 1y agoDatabase NULL is a valid pattern that any parser SHOULD support and I do consider that a design bug in every parser Go has. Offhand most of them effectively 'update' an object, but make it difficult or impossible to tell if something was __set__ with a value, or merely inherited a default.