-
Notifications
You must be signed in to change notification settings - Fork 806
Feature request: xxxtags (moretags for XXX_* fields) #647
Copy link
Copy link
Open
Description
As requested in https://groups.google.com/forum/#!topic/gogoprotobuf/xmFnqAS6MIc
it would very useful to be able to set struct tags on the XXX_* fields, so that they can be ignored when used for other serialization formats. (For example, the json:"_" struct tag is already added to those fields by default.)
type Station struct {
AlignmentId string `protobuf:"bytes,1,opt,name=alignment_id,json=alignmentId,proto3" json:"alignment_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_sizecache int32 `json:"-"`
}Would it be possible to have a message-level option called xxxtags, and a file-level analog xxxtags_all?
message Station {
option (gogoproto.xxxtags) = "firestore:\"-\"";
string alignment_id = 1;
};to generate:
type Station struct {
AlignmentId string `protobuf:"bytes,1,opt,name=alignment_id,json=alignmentId,proto3" json:"alignment_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-" firestore:"-"`
XXX_sizecache int32 `json:"-" firestore:"-"`
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels