Skip to content

oneof: generated code uses pointers for non-primitive types #78

@tamird

Description

@tamird

See:

Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"`

There's no need for this to be a pointer, since the union interface is implemented for a pointer of the wrapping struct. The downside of using a pointer here is that it results in an additional allocation.

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