NOTE: I know gogo/protobuf is deprecated. Just notes here for someone meeting this problem.
Version: v1.3.2
Here is the protobuf defines.
syntax = "proto3";
package pb;
option go_package = "./pb";
message Hello {
int32 id = 1;
int32 getId = 2;
}
And here is the compile commands for reproduce it.
# install
go install github.com/gogo/protobuf/[email protected]
go install github.com/gogo/protobuf/[email protected]
# compile
protoc -I . --go-gogoslick_out=. ./test.proto
# or
protoc -I . --go-gogofast_out=. ./test.proto
It may casing a syntax error that both exists a variable named GetId and a function named GetId.