Skip to content

Using compare plugin does not work for oneof #221

@johanbrandhorst

Description

@johanbrandhorst

Hi,

When using a message which contains a message with a oneof variable and using the setting to generate compare methods, the generated interface for the variable does not have the Compare() function generated as part of the interface.

Here is a gist which reproduces the error:

https://gist.github.com/johanbrandhorst/783e0908940a2f81d7aef7b1ac93472e

The offending line is my.pb.go:44:

type isValue_Type interface {
    isValue_Type()
}

Should be

type isValue_Type interface {
    isValue_Type()
    Compare(interface{}) int
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions