I am using google grpc with a json proxy. for some reason i need to remove the omitempty
tags from the struct generated in the *.pb.go files.
if i have a pr
I found that the omitempty
json tag is hard-coded into the protoc-gen-go source around line 1778:
tag := fmt.Sprintf("protobuf:%s json:%q",
g.goTag(message, field, wiretype), jsonName+",omitempty")
it will be easy changing the source and make a new protoc-gen-go binary yourself.
It's worth noting that this is likely inadvisable and not recommended for several reasons, particularly because you will then be responsible for ensuring that the hacked up binary always gets used if the protobufs need to be regenerated.