Introducing new types just to show few details is what I'd like to avoid.

I think second approach (mine and yours) is the most flexible, idiomatic 
way to go. But embedding directly has the disadvantage that all JSON fields 
must be prefixed to avoid ambiguity ("org-id", "team-id").

Tagging all fields with omitempty is doable, as long as there is 
no time.Time field

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to