Firstly, thanks a lot for this project, it's really great.
Provided awesome/v1/entity.proto:
package awesome.v1;
import "patch/go.proto";
option (go.lint).all = true;
enum MyEnum {
MY_ENUM_UNSPECIFIED = 0;
}
It generates idiomatic Go identifiers 👍 on entity.pb.go:
const (
MyEnumUnspecified MyEnum = 0
)
And then awesome/api/v1/api.proto:
package awesome.api.v1;
import "patch/go.proto";
import "awesome/v1/entity.proto"
option (go.lint).all = true;
message MessageWithMyEnum {
awesome.v1.MyEnum my_enum = 0;
}
But at generate this message, it fails to use the patched identifier on api.pb.go:
func (x *MessageWithMyEnum) GetMyEnum() v1.MyEnum {
if x != nil {
return x.MyEnum
}
return v1.MY_ENUM_UNSPECIFIED
}
This is worked around with this code:
enum MyEnum {
MY_ENUM_UNSPECIFIED = 0 [(go.value) = {name:'MyEnumUnspecified'}];
}
Thanks!