customname

27 views
Skip to first unread message

Walter Schulze

unread,
Mar 29, 2014, 2:06:41 PM3/29/14
to gogopr...@googlegroups.com
Just added a new feature, customname.
customname changes the generated fieldname. This is especially useful when generated methods conflict with fieldnames.

This was in response to an issue some users had:
http://code.google.com/p/gogoprotobuf/issues/detail?id=9&can=1

message C {
	optional int64 size = 1 [(gogoproto.customname) = "MySize"];
}

Will now be generated as:

type C struct { MySize *int64 }

Reply all
Reply to author
Forward
0 new messages