| Index: proto/testdata/test.pb.go.golden |
| =================================================================== |
| --- a/proto/testdata/test.pb.go.golden |
| +++ b/proto/testdata/test.pb.go.golden |
| @@ -107,8 +107,8 @@ |
| } |
| type GoTestField struct { |
| - Label *string "PB(bytes,1,req)" |
| - Type *string "PB(bytes,2,req)" |
| + Label *string `proto:"PB(bytes,1,req)"` |
| + Type *string `proto:"PB(bytes,2,req)"` |
| XXX_unrecognized []byte |
| } |
| func (this *GoTestField) Reset() { |
| @@ -119,67 +119,67 @@ |
| } |
| type GoTest struct { |
| - Kind *int32 "PB(varint,1,req)" |
| - Table *string "PB(bytes,2,opt)" |
| - Param *int32 "PB(varint,3,opt)" |
| - RequiredField *GoTestField "PB(bytes,4,req)" |
| - RepeatedField []*GoTestField "PB(bytes,5,rep)" |
| - OptionalField *GoTestField "PB(bytes,6,opt)" |
| - F_BoolRequired *bool "PB(varint,10,req,name=F_Bool_required)" |
| - F_Int32Required *int32 "PB(varint,11,req,name=F_Int32_required)" |
| - F_Int64Required *int64 "PB(varint,12,req,name=F_Int64_required)" |
| - F_Fixed32Required *uint32 "PB(fixed32,13,req,name=F_Fixed32_required)" |
| - F_Fixed64Required *uint64 "PB(fixed64,14,req,name=F_Fixed64_required)" |
| - F_Uint32Required *uint32 "PB(varint,15,req,name=F_Uint32_required)" |
| - F_Uint64Required *uint64 "PB(varint,16,req,name=F_Uint64_required)" |
| - F_FloatRequired *float32 "PB(fixed32,17,req,name=F_Float_required)" |
| - F_DoubleRequired *float64 "PB(fixed64,18,req,name=F_Double_required)" |
| - F_StringRequired *string "PB(bytes,19,req,name=F_String_required)" |
| - F_BytesRequired []byte "PB(bytes,101,req,name=F_Bytes_required)" |
| - F_Sint32Required *int32 "PB(zigzag32,102,req,name=F_Sint32_required)" |
| - F_Sint64Required *int64 "PB(zigzag64,103,req,name=F_Sint64_required)" |
| - F_BoolRepeated []bool "PB(varint,20,rep,name=F_Bool_repeated)" |
| - F_Int32Repeated []int32 "PB(varint,21,rep,name=F_Int32_repeated)" |
| - F_Int64Repeated []int64 "PB(varint,22,rep,name=F_Int64_repeated)" |
| - F_Fixed32Repeated []uint32 "PB(fixed32,23,rep,name=F_Fixed32_repeated)" |
| - F_Fixed64Repeated []uint64 "PB(fixed64,24,rep,name=F_Fixed64_repeated)" |
| - F_Uint32Repeated []uint32 "PB(varint,25,rep,name=F_Uint32_repeated)" |
| - F_Uint64Repeated []uint64 "PB(varint,26,rep,name=F_Uint64_repeated)" |
| - F_FloatRepeated []float32 "PB(fixed32,27,rep,name=F_Float_repeated)" |
| - F_DoubleRepeated []float64 "PB(fixed64,28,rep,name=F_Double_repeated)" |
| - F_StringRepeated []string "PB(bytes,29,rep,name=F_String_repeated)" |
| - F_BytesRepeated [][]byte "PB(bytes,201,rep,name=F_Bytes_repeated)" |
| - F_Sint32Repeated []int32 "PB(zigzag32,202,rep,name=F_Sint32_repeated)" |
| - F_Sint64Repeated []int64 "PB(zigzag64,203,rep,name=F_Sint64_repeated)" |
| - F_BoolOptional *bool "PB(varint,30,opt,name=F_Bool_optional)" |
| - F_Int32Optional *int32 "PB(varint,31,opt,name=F_Int32_optional)" |
| - F_Int64Optional *int64 "PB(varint,32,opt,name=F_Int64_optional)" |
| - F_Fixed32Optional *uint32 "PB(fixed32,33,opt,name=F_Fixed32_optional)" |
| - F_Fixed64Optional *uint64 "PB(fixed64,34,opt,name=F_Fixed64_optional)" |
| - F_Uint32Optional *uint32 "PB(varint,35,opt,name=F_Uint32_optional)" |
| - F_Uint64Optional *uint64 "PB(varint,36,opt,name=F_Uint64_optional)" |
| - F_FloatOptional *float32 "PB(fixed32,37,opt,name=F_Float_optional)" |
| - F_DoubleOptional *float64 "PB(fixed64,38,opt,name=F_Double_optional)" |
| - F_StringOptional *string "PB(bytes,39,opt,name=F_String_optional)" |
| - F_BytesOptional []byte "PB(bytes,301,opt,name=F_Bytes_optional)" |
| - F_Sint32Optional *int32 "PB(zigzag32,302,opt,name=F_Sint32_optional)" |
| - F_Sint64Optional *int64 "PB(zigzag64,303,opt,name=F_Sint64_optional)" |
| - F_BoolDefaulted *bool "PB(varint,40,opt,name=F_Bool_defaulted,def=1)" |
| - F_Int32Defaulted *int32 "PB(varint,41,opt,name=F_Int32_defaulted,def=32)" |
| - F_Int64Defaulted *int64 "PB(varint,42,opt,name=F_Int64_defaulted,def=64)" |
| - F_Fixed32Defaulted *uint32 "PB(fixed32,43,opt,name=F_Fixed32_defaulted,def=320)" |
| - F_Fixed64Defaulted *uint64 "PB(fixed64,44,opt,name=F_Fixed64_defaulted,def=640)" |
| - F_Uint32Defaulted *uint32 "PB(varint,45,opt,name=F_Uint32_defaulted,def=3200)" |
| - F_Uint64Defaulted *uint64 "PB(varint,46,opt,name=F_Uint64_defaulted,def=6400)" |
| - F_FloatDefaulted *float32 "PB(fixed32,47,opt,name=F_Float_defaulted,def=314159)" |
| - F_DoubleDefaulted *float64 "PB(fixed64,48,opt,name=F_Double_defaulted,def=271828)" |
| - F_StringDefaulted *string "PB(bytes,49,opt,name=F_String_defaulted,def=hello, \\\"world!\\\"\\n)" |
| - F_BytesDefaulted []byte "PB(bytes,401,opt,name=F_Bytes_defaulted,def=Bignose)" |
| - F_Sint32Defaulted *int32 "PB(zigzag32,402,opt,name=F_Sint32_defaulted,def=-32)" |
| - F_Sint64Defaulted *int64 "PB(zigzag64,403,opt,name=F_Sint64_defaulted,def=-64)" |
| - Requiredgroup *GoTest_RequiredGroup "PB(group,70,req,name=requiredgroup)" |
| - Repeatedgroup []*GoTest_RepeatedGroup "PB(group,80,rep,name=repeatedgroup)" |
| - Optionalgroup *GoTest_OptionalGroup "PB(group,90,opt,name=optionalgroup)" |
| + Kind *int32 `proto:"PB(varint,1,req)"` |
| + Table *string `proto:"PB(bytes,2,opt)"` |
| + Param *int32 `proto:"PB(varint,3,opt)"` |
| + RequiredField *GoTestField `proto:"PB(bytes,4,req)"` |
| + RepeatedField []*GoTestField `proto:"PB(bytes,5,rep)"` |
| + OptionalField *GoTestField `proto:"PB(bytes,6,opt)"` |
| + F_BoolRequired *bool `proto:"PB(varint,10,req,name=F_Bool_required)"` |
| + F_Int32Required *int32 `proto:"PB(varint,11,req,name=F_Int32_required)"` |
| + F_Int64Required *int64 `proto:"PB(varint,12,req,name=F_Int64_required)"` |
| + F_Fixed32Required *uint32 `proto:"PB(fixed32,13,req,name=F_Fixed32_required)"` |
| + F_Fixed64Required *uint64 `proto:"PB(fixed64,14,req,name=F_Fixed64_required)"` |
| + F_Uint32Required *uint32 `proto:"PB(varint,15,req,name=F_Uint32_required)"` |
| + F_Uint64Required *uint64 `proto:"PB(varint,16,req,name=F_Uint64_required)"` |
| + F_FloatRequired *float32 `proto:"PB(fixed32,17,req,name=F_Float_required)"` |
| + F_DoubleRequired *float64 `proto:"PB(fixed64,18,req,name=F_Double_required)"` |
| + F_StringRequired *string `proto:"PB(bytes,19,req,name=F_String_required)"` |
| + F_BytesRequired []byte `proto:"PB(bytes,101,req,name=F_Bytes_required)"` |
| + F_Sint32Required *int32 `proto:"PB(zigzag32,102,req,name=F_Sint32_required)"` |
| + F_Sint64Required *int64 `proto:"PB(zigzag64,103,req,name=F_Sint64_required)"` |
| + F_BoolRepeated []bool `proto:"PB(varint,20,rep,name=F_Bool_repeated)"` |
| + F_Int32Repeated []int32 `proto:"PB(varint,21,rep,name=F_Int32_repeated)"` |
| + F_Int64Repeated []int64 `proto:"PB(varint,22,rep,name=F_Int64_repeated)"` |
| + F_Fixed32Repeated []uint32 `proto:"PB(fixed32,23,rep,name=F_Fixed32_repeated)"` |
| + F_Fixed64Repeated []uint64 `proto:"PB(fixed64,24,rep,name=F_Fixed64_repeated)"` |
| + F_Uint32Repeated []uint32 `proto:"PB(varint,25,rep,name=F_Uint32_repeated)"` |
| + F_Uint64Repeated []uint64 `proto:"PB(varint,26,rep,name=F_Uint64_repeated)"` |
| + F_FloatRepeated []float32 `proto:"PB(fixed32,27,rep,name=F_Float_repeated)"` |
| + F_DoubleRepeated []float64 `proto:"PB(fixed64,28,rep,name=F_Double_repeated)"` |
| + F_StringRepeated []string `proto:"PB(bytes,29,rep,name=F_String_repeated)"` |
| + F_BytesRepeated [][]byte `proto:"PB(bytes,201,rep,name=F_Bytes_repeated)"` |
| + F_Sint32Repeated []int32 `proto:"PB(zigzag32,202,rep,name=F_Sint32_repeated)"` |
| + F_Sint64Repeated []int64 `proto:"PB(zigzag64,203,rep,name=F_Sint64_repeated)"` |
| + F_BoolOptional *bool `proto:"PB(varint,30,opt,name=F_Bool_optional)"` |
| + F_Int32Optional *int32 `proto:"PB(varint,31,opt,name=F_Int32_optional)"` |
| + F_Int64Optional *int64 `proto:"PB(varint,32,opt,name=F_Int64_optional)"` |
| + F_Fixed32Optional *uint32 `proto:"PB(fixed32,33,opt,name=F_Fixed32_optional)"` |
| + F_Fixed64Optional *uint64 `proto:"PB(fixed64,34,opt,name=F_Fixed64_optional)"` |
| + F_Uint32Optional *uint32 `proto:"PB(varint,35,opt,name=F_Uint32_optional)"` |
| + F_Uint64Optional *uint64 `proto:"PB(varint,36,opt,name=F_Uint64_optional)"` |
| + F_FloatOptional *float32 `proto:"PB(fixed32,37,opt,name=F_Float_optional)"` |
| + F_DoubleOptional *float64 `proto:"PB(fixed64,38,opt,name=F_Double_optional)"` |
| + F_StringOptional *string `proto:"PB(bytes,39,opt,name=F_String_optional)"` |
| + F_BytesOptional []byte `proto:"PB(bytes,301,opt,name=F_Bytes_optional)"` |
| + F_Sint32Optional *int32 `proto:"PB(zigzag32,302,opt,name=F_Sint32_optional)"` |
| + F_Sint64Optional *int64 `proto:"PB(zigzag64,303,opt,name=F_Sint64_optional)"` |
| + F_BoolDefaulted *bool `proto:"PB(varint,40,opt,name=F_Bool_defaulted,def=1)"` |
| + F_Int32Defaulted *int32 `proto:"PB(varint,41,opt,name=F_Int32_defaulted,def=32)"` |
| + F_Int64Defaulted *int64 `proto:"PB(varint,42,opt,name=F_Int64_defaulted,def=64)"` |
| + F_Fixed32Defaulted *uint32 `proto:"PB(fixed32,43,opt,name=F_Fixed32_defaulted,def=320)"` |
| + F_Fixed64Defaulted *uint64 `proto:"PB(fixed64,44,opt,name=F_Fixed64_defaulted,def=640)"` |
| + F_Uint32Defaulted *uint32 `proto:"PB(varint,45,opt,name=F_Uint32_defaulted,def=3200)"` |
| + F_Uint64Defaulted *uint64 `proto:"PB(varint,46,opt,name=F_Uint64_defaulted,def=6400)"` |
| + F_FloatDefaulted *float32 `proto:"PB(fixed32,47,opt,name=F_Float_defaulted,def=314159)"` |
| + F_DoubleDefaulted *float64 `proto:"PB(fixed64,48,opt,name=F_Double_defaulted,def=271828)"` |
| + F_StringDefaulted *string `proto:"PB(bytes,49,opt,name=F_String_defaulted,def=hello, \\\"world!\\\"\\n)"` |
| + F_BytesDefaulted []byte `proto:"PB(bytes,401,opt,name=F_Bytes_defaulted,def=Bignose)"` |
| + F_Sint32Defaulted *int32 `proto:"PB(zigzag32,402,opt,name=F_Sint32_defaulted,def=-32)"` |
| + F_Sint64Defaulted *int64 `proto:"PB(zigzag64,403,opt,name=F_Sint64_defaulted,def=-64)"` |
| + Requiredgroup *GoTest_RequiredGroup `proto:"PB(group,70,req,name=requiredgroup)"` |
| + Repeatedgroup []*GoTest_RepeatedGroup `proto:"PB(group,80,rep,name=repeatedgroup)"` |
| + Optionalgroup *GoTest_OptionalGroup `proto:"PB(group,90,opt,name=optionalgroup)"` |
| XXX_unrecognized []byte |
| } |
| func (this *GoTest) Reset() { |
| @@ -203,7 +203,7 @@ |
| const Default_GoTest_F_Sint64Defaulted int64 = -64 |
| type GoTest_RequiredGroup struct { |
| - RequiredField *string "PB(bytes,71,req)" |
| + RequiredField *string `proto:"PB(bytes,71,req)"` |
| XXX_unrecognized []byte |
| } |
| func (this *GoTest_RequiredGroup) Reset() { |
| @@ -214,7 +214,7 @@ |
| } |
| type GoTest_RepeatedGroup struct { |
| - RequiredField *string "PB(bytes,81,req)" |
| + RequiredField *string `proto:"PB(bytes,81,req)"` |
| XXX_unrecognized []byte |
| } |
| func (this *GoTest_RepeatedGroup) Reset() { |
| @@ -225,7 +225,7 @@ |
| } |
| type GoTest_OptionalGroup struct { |
| - RequiredField *string "PB(bytes,91,req)" |
| + RequiredField *string `proto:"PB(bytes,91,req)"` |
| XXX_unrecognized []byte |
| } |
| func (this *GoTest_OptionalGroup) Reset() { |
| @@ -236,11 +236,11 @@ |
| } |
| type GoSkipTest struct { |
| - SkipInt32 *int32 "PB(varint,11,req,name=skip_int32)" |
| - SkipFixed32 *uint32 "PB(fixed32,12,req,name=skip_fixed32)" |
| - SkipFixed64 *uint64 "PB(fixed64,13,req,name=skip_fixed64)" |
| - SkipString *string "PB(bytes,14,req,name=skip_string)" |
| - Skipgroup *GoSkipTest_SkipGroup "PB(group,15,req,name=skipgroup)" |
| + SkipInt32 *int32 `proto:"PB(varint,11,req,name=skip_int32)"` |
| + SkipFixed32 *uint32 `proto:"PB(fixed32,12,req,name=skip_fixed32)"` |
| + SkipFixed64 *uint64 `proto:"PB(fixed64,13,req,name=skip_fixed64)"` |
| + SkipString *string `proto:"PB(bytes,14,req,name=skip_string)"` |
| + Skipgroup *GoSkipTest_SkipGroup `proto:"PB(group,15,req,name=skipgroup)"` |
| XXX_unrecognized []byte |
| } |
| func (this *GoSkipTest) Reset() { |
| @@ -251,8 +251,8 @@ |
| } |
| type GoSkipTest_SkipGroup struct { |
| - GroupInt32 *int32 "PB(varint,16,req,name=group_int32)" |
| - GroupString *string "PB(bytes,17,req,name=group_string)" |
| + GroupInt32 *int32 `proto:"PB(varint,16,req,name=group_int32)"` |
| + GroupString *string `proto:"PB(bytes,17,req,name=group_string)"` |
| XXX_unrecognized []byte |
| } |
| func (this *GoSkipTest_SkipGroup) Reset() { |
| @@ -263,9 +263,9 @@ |
| } |
| type InnerMessage struct { |
| - Host *string "PB(bytes,1,req,name=host)" |
| - Port *int32 "PB(varint,2,opt,name=port,def=4000)" |
| - Connected *bool "PB(varint,3,opt,name=connected)" |
| + Host *string `proto:"PB(bytes,1,req,name=host)"` |
| + Port *int32 `proto:"PB(varint,2,opt,name=port,def=4000)"` |
| + Connected *bool `proto:"PB(varint,3,opt,name=connected)"` |
| XXX_unrecognized []byte |
| } |
| func (this *InnerMessage) Reset() { |
| @@ -277,10 +277,10 @@ |
| const Default_InnerMessage_Port int32 = 4000 |
| type OtherMessage struct { |
| - Key *int64 "PB(varint,1,opt,name=key)" |
| - Value []byte "PB(bytes,2,opt,name=value)" |
| - Weight *float32 "PB(fixed32,3,opt,name=weight)" |
| - Inner *InnerMessage "PB(bytes,4,opt,name=inner)" |
| + Key *int64 `proto:"PB(varint,1,opt,name=key)"` |
| + Value []byte `proto:"PB(bytes,2,opt,name=value)"` |
| + Weight *float32 `proto:"PB(fixed32,3,opt,name=weight)"` |
| + Inner *InnerMessage `proto:"PB(bytes,4,opt,name=inner)"` |
| XXX_unrecognized []byte |
| } |
| func (this *OtherMessage) Reset() { |
| @@ -291,13 +291,13 @@ |
| } |
| type MyMessage struct { |
| - Count *int32 "PB(varint,1,req,name=count)" |
| - Name *string "PB(bytes,2,opt,name=name)" |
| - Quote *string "PB(bytes,3,opt,name=quote)" |
| - Pet []string "PB(bytes,4,rep,name=pet)" |
| - Inner *InnerMessage "PB(bytes,5,opt,name=inner)" |
| - Others []*OtherMessage "PB(bytes,6,rep,name=others)" |
| - Bikeshed *MyMessage_Color "PB(varint,7,opt,name=bikeshed,enum=test_proto.MyMessage_Color)" |
| + Count *int32 `proto:"PB(varint,1,req,name=count)"` |
| + Name *string `proto:"PB(bytes,2,opt,name=name)"` |
| + Quote *string `proto:"PB(bytes,3,opt,name=quote)"` |
| + Pet []string `proto:"PB(bytes,4,rep,name=pet)"` |
| + Inner *InnerMessage `proto:"PB(bytes,5,opt,name=inner)"` |
| + Others []*OtherMessage `proto:"PB(bytes,6,rep,name=others)"` |
| + Bikeshed *MyMessage_Color `proto:"PB(varint,7,opt,name=bikeshed,enum=test_proto.MyMessage_Color)"` |
| XXX_unrecognized []byte |
| } |
| func (this *MyMessage) Reset() { |
| @@ -308,7 +308,7 @@ |
| } |
| type MessageList struct { |
| - Message []*MessageList_Message "PB(group,1,rep,name=message)" |
| + Message []*MessageList_Message `proto:"PB(group,1,rep,name=message)"` |
| XXX_unrecognized []byte |
| } |
| func (this *MessageList) Reset() { |
| @@ -319,8 +319,8 @@ |
| } |
| type MessageList_Message struct { |
| - Name *string "PB(bytes,2,req,name=name)" |
| - Count *int32 "PB(varint,3,req,name=count)" |
| + Name *string `proto:"PB(bytes,2,req,name=name)"` |
| + Count *int32 `proto:"PB(varint,3,req,name=count)"` |
| XXX_unrecognized []byte |
| } |
| func (this *MessageList_Message) Reset() { |