Thanks for the explanation. It does look much better in proto3. I will
see if it will be possible to switch to proto3.
2016-08-03 21:37 GMT+05:30 Ian Lance Taylor :
> On Wed, Aug 3, 2016 at 8:58 AM, Sankar wrote:
>>
>> I have a .proto2 file, like:
>>
>> message s {
>> optional double a = 1;
>> }
On Wed, Aug 3, 2016 at 8:58 AM, Sankar wrote:
>
> I have a .proto2 file, like:
>
> message s {
> optional double a = 1;
> }
>
> When I run protoc and generate the .pb.go file, it contains code like:
>
> type S struct {
> A*float64 `protobuf:"fixed64,1,opt,name=a"
> json:"a,omitempt
Hi
I have a .proto2 file, like:
message s {
optional double a = 1;
}
When I run protoc and generate the .pb.go file, it contains code like:
type S struct {
A*float64 `protobuf:"fixed64,1,opt,name=a"
json:"a,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
Why is the A field