This week I learned:

  • Go’s 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)