Skip to content

encoding/gob: package documentation doesn't tell that only exported fields of a struct are encoded #4579

@gopherbot

Description

@gopherbot

by jbvanpuyvelde:

It's not written on the page http://golang.org/pkg/encoding/gob/ that the unexported
fields of a structure will not be serialized.

I took me some time to find the thread [1] where it is explained (it is also very
quickly said in the json package doc).

[1] https://groups.google.com/d/topic/golang-nuts/0jXG-5Y6VJA/discussion

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions