You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It isn't a major issue but if I have a field name id in my definition, the Go code which will be generated will set the field as Id instead of ID like for idiomatic Go code. Is there a way to hint to the compiler what the variable should be in a specific language so that it stays idiomatic to this language?
Example definition
// Job represents a job definition
message Job {
string id = 1;
}
Example generated code
// Job represents a job definition
type DeploymentJob struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
If we could do something like
// Job represents a job definition
message Job {
string id = 1; `go:"ID"`
}
which would then generate
// Job represents a job definition
type DeploymentJob struct {
ID string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
The text was updated successfully, but these errors were encountered:
It isn't a major issue but if I have a field name
id
in my definition, the Go code which will be generated will set the field asId
instead ofID
like for idiomatic Go code. Is there a way to hint to the compiler what the variable should be in a specific language so that it stays idiomatic to this language?Example definition
Example generated code
If we could do something like
which would then generate
The text was updated successfully, but these errors were encountered: