I am a Go language developer. Our team chose to use protocol buffers to transform data.
I chose this protobuf package: https://github.com/golang/protobuf.
However, this package has no method to handle the extensions
field in a protocol buffer. I have only found this code in the class file generated by protoc:
var E_Height = &proto.ExtensionDesc{
ExtendedType: (*Person)(nil),
ExtensionType: (*int32)(nil),
Field: 110,
Name: "eg.Height",
Tag: "varint,110,opt",
}
func init() {
proto.RegisterExtension(E_Height)
}
So, how can I set/get the extensions
field in Go?