TWIL: 2026-05-08
This week I learned:
- Go’s
omitemptyapplies to the struct itself, NOT to the JSON decoding of it (i.e. - if the pointer is non-nil but encodes to empty JSON, it is NOT omitted)
This week I learned:
omitempty applies to the struct itself, NOT to the JSON decoding of it
(i.e. - if the pointer is non-nil but encodes to empty JSON, it is NOT omitted)