Skip to content

-unexported flag encodes/decodes unexported fields #251

@zeldovich

Description

@zeldovich

The documentation for msgp -unexported says that it will process unexported types (like type myint int), but it has the unexpected additional behavior of encoding and decoding unexported fields (like type Foo struct { hidden int }). This can be a significant change in behavior in scenarios where the developer was expecting unexported fields to be hidden at encoding time and to be preserved at decoding time.

It would be great to reconcile the documentation with behavior of -unexported, ideally by not encoding/decoding unexported struct fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions