Hi
I have a database that has a column `2xxCode`. This database is part of a legacy system and I cannot make changes to this, as there are multiple applications that depend on this, and some of the applications are unchangeable.
Now I want to create a new gRPC server in golang that has to interact with the data stored in this database.
Since golang variable names cannot begin with a number, I need create a `.proto` file which should generate a golang struct member like:
type mystruct {
TwoxxCode `db:"2xxCode"`
}
from my .proto file. But I could not find out how to generate a golang struct from a .proto file, with adding custom tags to the struct. On searching, I found
https://github.com/golang/protobuf/issues/52 and the second comment on the issue seems very strongly worded as if this would never happen in protobuf. Also, the bug seems open for a long time.
How have others solved this problem to add custom tags to proto generated golang structs ? Are there any best-known-methods for this ? There were a couple of scripts mentioned in the comments, but I am not sure what to pick. Any recommendations ?
Thanks.