Skip to content

Interface types generate associated functions. Maybe they shouldn't. #379

Open
@antdjohns

Description

@antdjohns

We are looking to handle polymorphic responses and for that we are using an Interface "IEvent" as a marker for this type. When easyjson generates unmarshaling and marshaling code for this type it uses the interface opposed to the structs that fit the interface type. This results in nil pointer panics when unmarshal is called on the interface.

To work around I simply removed the []IEvent type and replaced with []interface{}.

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