On Sat, Dec 10, 2016 at 5:49 PM, Hoping White <baihaop...@gmail.com> wrote: > Hi, all > > I find that gob encoding ignores fields when they have zero values. > I wonder if this is a bug or an feature? >
" If a field has the zero value for its type (except for arrays; see above), it is omitted from the transmission." https://golang.org/pkg/encoding/gob/#hdr-Encoding_Details It's a feature, it makes gobs smaller. -- 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.