goprotobuf: Changes for new struct tag format.
Protocol messages have changed their struct tags from
"PB(...)"
to
`protobuf:"..."`
The format represented by "..." is unchanged.
Regenerate {descriptor,plugin}.pb.go files at the same time.
R=r, rsc
CC=golang-dev
http://codereview.appspot.com/4654077
diff --git a/compiler/descriptor/descriptor.pb.go b/compiler/descriptor/descriptor.pb.go
index 6feab4b..507126e 100644
--- a/compiler/descriptor/descriptor.pb.go
+++ b/compiler/descriptor/descriptor.pb.go
@@ -12,37 +12,40 @@
var _ = math.Inf
var _ os.Error
+
type FieldDescriptorProto_Type int32
+
const (
- FieldDescriptorProto_TYPE_DOUBLE = 1
- FieldDescriptorProto_TYPE_FLOAT = 2
- FieldDescriptorProto_TYPE_INT64 = 3
- FieldDescriptorProto_TYPE_UINT64 = 4
- FieldDescriptorProto_TYPE_INT32 = 5
- FieldDescriptorProto_TYPE_FIXED64 = 6
- FieldDescriptorProto_TYPE_FIXED32 = 7
- FieldDescriptorProto_TYPE_BOOL = 8
- FieldDescriptorProto_TYPE_STRING = 9
- FieldDescriptorProto_TYPE_GROUP = 10
- FieldDescriptorProto_TYPE_MESSAGE = 11
- FieldDescriptorProto_TYPE_BYTES = 12
- FieldDescriptorProto_TYPE_UINT32 = 13
- FieldDescriptorProto_TYPE_ENUM = 14
+ FieldDescriptorProto_TYPE_DOUBLE = 1
+ FieldDescriptorProto_TYPE_FLOAT = 2
+ FieldDescriptorProto_TYPE_INT64 = 3
+ FieldDescriptorProto_TYPE_UINT64 = 4
+ FieldDescriptorProto_TYPE_INT32 = 5
+ FieldDescriptorProto_TYPE_FIXED64 = 6
+ FieldDescriptorProto_TYPE_FIXED32 = 7
+ FieldDescriptorProto_TYPE_BOOL = 8
+ FieldDescriptorProto_TYPE_STRING = 9
+ FieldDescriptorProto_TYPE_GROUP = 10
+ FieldDescriptorProto_TYPE_MESSAGE = 11
+ FieldDescriptorProto_TYPE_BYTES = 12
+ FieldDescriptorProto_TYPE_UINT32 = 13
+ FieldDescriptorProto_TYPE_ENUM = 14
FieldDescriptorProto_TYPE_SFIXED32 = 15
FieldDescriptorProto_TYPE_SFIXED64 = 16
- FieldDescriptorProto_TYPE_SINT32 = 17
- FieldDescriptorProto_TYPE_SINT64 = 18
+ FieldDescriptorProto_TYPE_SINT32 = 17
+ FieldDescriptorProto_TYPE_SINT64 = 18
)
-var FieldDescriptorProto_Type_name = map[int32] string {
- 1: "TYPE_DOUBLE",
- 2: "TYPE_FLOAT",
- 3: "TYPE_INT64",
- 4: "TYPE_UINT64",
- 5: "TYPE_INT32",
- 6: "TYPE_FIXED64",
- 7: "TYPE_FIXED32",
- 8: "TYPE_BOOL",
- 9: "TYPE_STRING",
+
+var FieldDescriptorProto_Type_name = map[int32]string{
+ 1: "TYPE_DOUBLE",
+ 2: "TYPE_FLOAT",
+ 3: "TYPE_INT64",
+ 4: "TYPE_UINT64",
+ 5: "TYPE_INT32",
+ 6: "TYPE_FIXED64",
+ 7: "TYPE_FIXED32",
+ 8: "TYPE_BOOL",
+ 9: "TYPE_STRING",
10: "TYPE_GROUP",
11: "TYPE_MESSAGE",
12: "TYPE_BYTES",
@@ -53,218 +56,239 @@
17: "TYPE_SINT32",
18: "TYPE_SINT64",
}
-var FieldDescriptorProto_Type_value = map[string] int32 {
- "TYPE_DOUBLE": 1,
- "TYPE_FLOAT": 2,
- "TYPE_INT64": 3,
- "TYPE_UINT64": 4,
- "TYPE_INT32": 5,
- "TYPE_FIXED64": 6,
- "TYPE_FIXED32": 7,
- "TYPE_BOOL": 8,
- "TYPE_STRING": 9,
- "TYPE_GROUP": 10,
- "TYPE_MESSAGE": 11,
- "TYPE_BYTES": 12,
- "TYPE_UINT32": 13,
- "TYPE_ENUM": 14,
+var FieldDescriptorProto_Type_value = map[string]int32{
+ "TYPE_DOUBLE": 1,
+ "TYPE_FLOAT": 2,
+ "TYPE_INT64": 3,
+ "TYPE_UINT64": 4,
+ "TYPE_INT32": 5,
+ "TYPE_FIXED64": 6,
+ "TYPE_FIXED32": 7,
+ "TYPE_BOOL": 8,
+ "TYPE_STRING": 9,
+ "TYPE_GROUP": 10,
+ "TYPE_MESSAGE": 11,
+ "TYPE_BYTES": 12,
+ "TYPE_UINT32": 13,
+ "TYPE_ENUM": 14,
"TYPE_SFIXED32": 15,
"TYPE_SFIXED64": 16,
- "TYPE_SINT32": 17,
- "TYPE_SINT64": 18,
+ "TYPE_SINT32": 17,
+ "TYPE_SINT64": 18,
}
+
func NewFieldDescriptorProto_Type(x int32) *FieldDescriptorProto_Type {
e := FieldDescriptorProto_Type(x)
return &e
}
+func (x FieldDescriptorProto_Type) String() string {
+ return proto.EnumName(FieldDescriptorProto_Type_name, int32(x))
+}
type FieldDescriptorProto_Label int32
+
const (
FieldDescriptorProto_LABEL_OPTIONAL = 1
FieldDescriptorProto_LABEL_REQUIRED = 2
FieldDescriptorProto_LABEL_REPEATED = 3
)
-var FieldDescriptorProto_Label_name = map[int32] string {
+
+var FieldDescriptorProto_Label_name = map[int32]string{
1: "LABEL_OPTIONAL",
2: "LABEL_REQUIRED",
3: "LABEL_REPEATED",
}
-var FieldDescriptorProto_Label_value = map[string] int32 {
+var FieldDescriptorProto_Label_value = map[string]int32{
"LABEL_OPTIONAL": 1,
"LABEL_REQUIRED": 2,
"LABEL_REPEATED": 3,
}
+
func NewFieldDescriptorProto_Label(x int32) *FieldDescriptorProto_Label {
e := FieldDescriptorProto_Label(x)
return &e
}
+func (x FieldDescriptorProto_Label) String() string {
+ return proto.EnumName(FieldDescriptorProto_Label_name, int32(x))
+}
type FileOptions_OptimizeMode int32
+
const (
- FileOptions_SPEED = 1
- FileOptions_CODE_SIZE = 2
+ FileOptions_SPEED = 1
+ FileOptions_CODE_SIZE = 2
FileOptions_LITE_RUNTIME = 3
)
-var FileOptions_OptimizeMode_name = map[int32] string {
+
+var FileOptions_OptimizeMode_name = map[int32]string{
1: "SPEED",
2: "CODE_SIZE",
3: "LITE_RUNTIME",
}
-var FileOptions_OptimizeMode_value = map[string] int32 {
- "SPEED": 1,
- "CODE_SIZE": 2,
+var FileOptions_OptimizeMode_value = map[string]int32{
+ "SPEED": 1,
+ "CODE_SIZE": 2,
"LITE_RUNTIME": 3,
}
+
func NewFileOptions_OptimizeMode(x int32) *FileOptions_OptimizeMode {
e := FileOptions_OptimizeMode(x)
return &e
}
+func (x FileOptions_OptimizeMode) String() string {
+ return proto.EnumName(FileOptions_OptimizeMode_name, int32(x))
+}
type FieldOptions_CType int32
+
const (
- FieldOptions_STRING = 0
- FieldOptions_CORD = 1
+ FieldOptions_STRING = 0
+ FieldOptions_CORD = 1
FieldOptions_STRING_PIECE = 2
)
-var FieldOptions_CType_name = map[int32] string {
+
+var FieldOptions_CType_name = map[int32]string{
0: "STRING",
1: "CORD",
2: "STRING_PIECE",
}
-var FieldOptions_CType_value = map[string] int32 {
- "STRING": 0,
- "CORD": 1,
+var FieldOptions_CType_value = map[string]int32{
+ "STRING": 0,
+ "CORD": 1,
"STRING_PIECE": 2,
}
+
func NewFieldOptions_CType(x int32) *FieldOptions_CType {
e := FieldOptions_CType(x)
return &e
}
+func (x FieldOptions_CType) String() string {
+ return proto.EnumName(FieldOptions_CType_name, int32(x))
+}
type FileDescriptorSet struct {
- File []*FileDescriptorProto "PB(bytes,1,rep,name=file)"
- XXX_unrecognized []byte
+ File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file"`
+ XXX_unrecognized []byte
}
-func (this *FileDescriptorSet) Reset() {
- *this = FileDescriptorSet{}
-}
+
+func (this *FileDescriptorSet) Reset() { *this = FileDescriptorSet{} }
+func (this *FileDescriptorSet) String() string { return proto.CompactTextString(this) }
type FileDescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- Package *string "PB(bytes,2,opt,name=package)"
- Dependency []string "PB(bytes,3,rep,name=dependency)"
- PublicDependency []int32 "PB(varint,10,rep,name=public_dependency)"
- MessageType []*DescriptorProto "PB(bytes,4,rep,name=message_type)"
- EnumType []*EnumDescriptorProto "PB(bytes,5,rep,name=enum_type)"
- Service []*ServiceDescriptorProto "PB(bytes,6,rep,name=service)"
- Extension []*FieldDescriptorProto "PB(bytes,7,rep,name=extension)"
- Options *FileOptions "PB(bytes,8,opt,name=options)"
- SourceCodeInfo *SourceCodeInfo "PB(bytes,9,opt,name=source_code_info)"
- XXX_unrecognized []byte
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ Package *string `protobuf:"bytes,2,opt,name=package"`
+ Dependency []string `protobuf:"bytes,3,rep,name=dependency"`
+ PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency"`
+ MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type"`
+ EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type"`
+ Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service"`
+ Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension"`
+ Options *FileOptions `protobuf:"bytes,8,opt,name=options"`
+ XXX_unrecognized []byte
}
-func (this *FileDescriptorProto) Reset() {
- *this = FileDescriptorProto{}
-}
+
+func (this *FileDescriptorProto) Reset() { *this = FileDescriptorProto{} }
+func (this *FileDescriptorProto) String() string { return proto.CompactTextString(this) }
type DescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- Field []*FieldDescriptorProto "PB(bytes,2,rep,name=field)"
- Extension []*FieldDescriptorProto "PB(bytes,6,rep,name=extension)"
- NestedType []*DescriptorProto "PB(bytes,3,rep,name=nested_type)"
- EnumType []*EnumDescriptorProto "PB(bytes,4,rep,name=enum_type)"
- ExtensionRange []*DescriptorProto_ExtensionRange "PB(bytes,5,rep,name=extension_range)"
- Options *MessageOptions "PB(bytes,7,opt,name=options)"
- XXX_unrecognized []byte
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field"`
+ Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension"`
+ NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type"`
+ EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type"`
+ ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range"`
+ Options *MessageOptions `protobuf:"bytes,7,opt,name=options"`
+ XXX_unrecognized []byte
}
-func (this *DescriptorProto) Reset() {
- *this = DescriptorProto{}
-}
+
+func (this *DescriptorProto) Reset() { *this = DescriptorProto{} }
+func (this *DescriptorProto) String() string { return proto.CompactTextString(this) }
type DescriptorProto_ExtensionRange struct {
- Start *int32 "PB(varint,1,opt,name=start)"
- End *int32 "PB(varint,2,opt,name=end)"
- XXX_unrecognized []byte
+ Start *int32 `protobuf:"varint,1,opt,name=start"`
+ End *int32 `protobuf:"varint,2,opt,name=end"`
+ XXX_unrecognized []byte
}
-func (this *DescriptorProto_ExtensionRange) Reset() {
- *this = DescriptorProto_ExtensionRange{}
-}
+
+func (this *DescriptorProto_ExtensionRange) Reset() { *this = DescriptorProto_ExtensionRange{} }
+func (this *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(this) }
type FieldDescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- Number *int32 "PB(varint,3,opt,name=number)"
- Label *FieldDescriptorProto_Label "PB(varint,4,opt,name=label,enum=google_protobuf.FieldDescriptorProto_Label)"
- Type *FieldDescriptorProto_Type "PB(varint,5,opt,name=type,enum=google_protobuf.FieldDescriptorProto_Type)"
- TypeName *string "PB(bytes,6,opt,name=type_name)"
- Extendee *string "PB(bytes,2,opt,name=extendee)"
- DefaultValue *string "PB(bytes,7,opt,name=default_value)"
- Options *FieldOptions "PB(bytes,8,opt,name=options)"
- XXX_unrecognized []byte
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ Number *int32 `protobuf:"varint,3,opt,name=number"`
+ Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google_protobuf.FieldDescriptorProto_Label"`
+ Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google_protobuf.FieldDescriptorProto_Type"`
+ TypeName *string `protobuf:"bytes,6,opt,name=type_name"`
+ Extendee *string `protobuf:"bytes,2,opt,name=extendee"`
+ DefaultValue *string `protobuf:"bytes,7,opt,name=default_value"`
+ Options *FieldOptions `protobuf:"bytes,8,opt,name=options"`
+ XXX_unrecognized []byte
}
-func (this *FieldDescriptorProto) Reset() {
- *this = FieldDescriptorProto{}
-}
+
+func (this *FieldDescriptorProto) Reset() { *this = FieldDescriptorProto{} }
+func (this *FieldDescriptorProto) String() string { return proto.CompactTextString(this) }
type EnumDescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- Value []*EnumValueDescriptorProto "PB(bytes,2,rep,name=value)"
- Options *EnumOptions "PB(bytes,3,opt,name=options)"
- XXX_unrecognized []byte
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value"`
+ Options *EnumOptions `protobuf:"bytes,3,opt,name=options"`
+ XXX_unrecognized []byte
}
-func (this *EnumDescriptorProto) Reset() {
- *this = EnumDescriptorProto{}
-}
+
+func (this *EnumDescriptorProto) Reset() { *this = EnumDescriptorProto{} }
+func (this *EnumDescriptorProto) String() string { return proto.CompactTextString(this) }
type EnumValueDescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- Number *int32 "PB(varint,2,opt,name=number)"
- Options *EnumValueOptions "PB(bytes,3,opt,name=options)"
- XXX_unrecognized []byte
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ Number *int32 `protobuf:"varint,2,opt,name=number"`
+ Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options"`
+ XXX_unrecognized []byte
}
-func (this *EnumValueDescriptorProto) Reset() {
- *this = EnumValueDescriptorProto{}
-}
+
+func (this *EnumValueDescriptorProto) Reset() { *this = EnumValueDescriptorProto{} }
+func (this *EnumValueDescriptorProto) String() string { return proto.CompactTextString(this) }
type ServiceDescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- Method []*MethodDescriptorProto "PB(bytes,2,rep,name=method)"
- Options *ServiceOptions "PB(bytes,3,opt,name=options)"
- XXX_unrecognized []byte
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method"`
+ Options *ServiceOptions `protobuf:"bytes,3,opt,name=options"`
+ XXX_unrecognized []byte
}
-func (this *ServiceDescriptorProto) Reset() {
- *this = ServiceDescriptorProto{}
-}
+
+func (this *ServiceDescriptorProto) Reset() { *this = ServiceDescriptorProto{} }
+func (this *ServiceDescriptorProto) String() string { return proto.CompactTextString(this) }
type MethodDescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- InputType *string "PB(bytes,2,opt,name=input_type)"
- OutputType *string "PB(bytes,3,opt,name=output_type)"
- Options *MethodOptions "PB(bytes,4,opt,name=options)"
- XXX_unrecognized []byte
-}
-func (this *MethodDescriptorProto) Reset() {
- *this = MethodDescriptorProto{}
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ InputType *string `protobuf:"bytes,2,opt,name=input_type"`
+ OutputType *string `protobuf:"bytes,3,opt,name=output_type"`
+ Options *MethodOptions `protobuf:"bytes,4,opt,name=options"`
+ XXX_unrecognized []byte
}
+func (this *MethodDescriptorProto) Reset() { *this = MethodDescriptorProto{} }
+func (this *MethodDescriptorProto) String() string { return proto.CompactTextString(this) }
+
type FileOptions struct {
- JavaPackage *string "PB(bytes,1,opt,name=java_package)"
- JavaOuterClassname *string "PB(bytes,8,opt,name=java_outer_classname)"
- JavaMultipleFiles *bool "PB(varint,10,opt,name=java_multiple_files,def=0)"
- JavaGenerateEqualsAndHash *bool "PB(varint,20,opt,name=java_generate_equals_and_hash,def=0)"
- OptimizeFor *FileOptions_OptimizeMode "PB(varint,9,opt,name=optimize_for,enum=google_protobuf.FileOptions_OptimizeMode,def=1)"
- CcGenericServices *bool "PB(varint,16,opt,name=cc_generic_services,def=0)"
- JavaGenericServices *bool "PB(varint,17,opt,name=java_generic_services,def=0)"
- PyGenericServices *bool "PB(varint,18,opt,name=py_generic_services,def=0)"
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ JavaPackage *string `protobuf:"bytes,1,opt,name=java_package"`
+ JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname"`
+ JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,def=0"`
+ OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,enum=google_protobuf.FileOptions_OptimizeMode,def=1"`
+ CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,def=1"`
+ JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,def=1"`
+ PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,def=1"`
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *FileOptions) Reset() {
- *this = FileOptions{}
-}
+
+func (this *FileOptions) Reset() { *this = FileOptions{} }
+func (this *FileOptions) String() string { return proto.CompactTextString(this) }
var extRange_FileOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_FileOptions
}
@@ -274,27 +298,28 @@
}
return this.XXX_extensions
}
+
const Default_FileOptions_JavaMultipleFiles bool = false
-const Default_FileOptions_JavaGenerateEqualsAndHash bool = false
const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED
-const Default_FileOptions_CcGenericServices bool = false
-const Default_FileOptions_JavaGenericServices bool = false
-const Default_FileOptions_PyGenericServices bool = false
+const Default_FileOptions_CcGenericServices bool = true
+const Default_FileOptions_JavaGenericServices bool = true
+const Default_FileOptions_PyGenericServices bool = true
type MessageOptions struct {
- MessageSetWireFormat *bool "PB(varint,1,opt,name=message_set_wire_format,def=0)"
- NoStandardDescriptorAccessor *bool "PB(varint,2,opt,name=no_standard_descriptor_accessor,def=0)"
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,def=0"`
+ NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,def=0"`
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *MessageOptions) Reset() {
- *this = MessageOptions{}
-}
+
+func (this *MessageOptions) Reset() { *this = MessageOptions{} }
+func (this *MessageOptions) String() string { return proto.CompactTextString(this) }
var extRange_MessageOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_MessageOptions
}
@@ -304,25 +329,27 @@
}
return this.XXX_extensions
}
+
const Default_MessageOptions_MessageSetWireFormat bool = false
const Default_MessageOptions_NoStandardDescriptorAccessor bool = false
type FieldOptions struct {
- Ctype *FieldOptions_CType "PB(varint,1,opt,name=ctype,enum=google_protobuf.FieldOptions_CType,def=0)"
- Packed *bool "PB(varint,2,opt,name=packed)"
- Deprecated *bool "PB(varint,3,opt,name=deprecated,def=0)"
- ExperimentalMapKey *string "PB(bytes,9,opt,name=experimental_map_key)"
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google_protobuf.FieldOptions_CType,def=0"`
+ Packed *bool `protobuf:"varint,2,opt,name=packed"`
+ Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0"`
+ ExperimentalMapKey *string `protobuf:"bytes,9,opt,name=experimental_map_key"`
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *FieldOptions) Reset() {
- *this = FieldOptions{}
-}
+
+func (this *FieldOptions) Reset() { *this = FieldOptions{} }
+func (this *FieldOptions) String() string { return proto.CompactTextString(this) }
var extRange_FieldOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_FieldOptions
}
@@ -332,21 +359,23 @@
}
return this.XXX_extensions
}
+
const Default_FieldOptions_Ctype FieldOptions_CType = FieldOptions_STRING
const Default_FieldOptions_Deprecated bool = false
type EnumOptions struct {
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *EnumOptions) Reset() {
- *this = EnumOptions{}
-}
+
+func (this *EnumOptions) Reset() { *this = EnumOptions{} }
+func (this *EnumOptions) String() string { return proto.CompactTextString(this) }
var extRange_EnumOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_EnumOptions
}
@@ -358,17 +387,18 @@
}
type EnumValueOptions struct {
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *EnumValueOptions) Reset() {
- *this = EnumValueOptions{}
-}
+
+func (this *EnumValueOptions) Reset() { *this = EnumValueOptions{} }
+func (this *EnumValueOptions) String() string { return proto.CompactTextString(this) }
var extRange_EnumValueOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_EnumValueOptions
}
@@ -380,17 +410,18 @@
}
type ServiceOptions struct {
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *ServiceOptions) Reset() {
- *this = ServiceOptions{}
-}
+
+func (this *ServiceOptions) Reset() { *this = ServiceOptions{} }
+func (this *ServiceOptions) String() string { return proto.CompactTextString(this) }
var extRange_ServiceOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_ServiceOptions
}
@@ -402,17 +433,18 @@
}
type MethodOptions struct {
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *MethodOptions) Reset() {
- *this = MethodOptions{}
-}
+
+func (this *MethodOptions) Reset() { *this = MethodOptions{} }
+func (this *MethodOptions) String() string { return proto.CompactTextString(this) }
var extRange_MethodOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_MethodOptions
}
@@ -424,44 +456,26 @@
}
type UninterpretedOption struct {
- Name []*UninterpretedOption_NamePart "PB(bytes,2,rep,name=name)"
- IdentifierValue *string "PB(bytes,3,opt,name=identifier_value)"
- PositiveIntValue *uint64 "PB(varint,4,opt,name=positive_int_value)"
- NegativeIntValue *int64 "PB(varint,5,opt,name=negative_int_value)"
- DoubleValue *float64 "PB(fixed64,6,opt,name=double_value)"
- StringValue []byte "PB(bytes,7,opt,name=string_value)"
- AggregateValue *string "PB(bytes,8,opt,name=aggregate_value)"
- XXX_unrecognized []byte
+ Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name"`
+ IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value"`
+ PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value"`
+ NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value"`
+ DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value"`
+ StringValue []byte `protobuf:"bytes,7,opt,name=string_value"`
+ XXX_unrecognized []byte
}
-func (this *UninterpretedOption) Reset() {
- *this = UninterpretedOption{}
-}
+
+func (this *UninterpretedOption) Reset() { *this = UninterpretedOption{} }
+func (this *UninterpretedOption) String() string { return proto.CompactTextString(this) }
type UninterpretedOption_NamePart struct {
- NamePart *string "PB(bytes,1,req,name=name_part)"
- IsExtension *bool "PB(varint,2,req,name=is_extension)"
- XXX_unrecognized []byte
-}
-func (this *UninterpretedOption_NamePart) Reset() {
- *this = UninterpretedOption_NamePart{}
+ NamePart *string `protobuf:"bytes,1,req,name=name_part"`
+ IsExtension *bool `protobuf:"varint,2,req,name=is_extension"`
+ XXX_unrecognized []byte
}
-type SourceCodeInfo struct {
- Location []*SourceCodeInfo_Location "PB(bytes,1,rep,name=location)"
- XXX_unrecognized []byte
-}
-func (this *SourceCodeInfo) Reset() {
- *this = SourceCodeInfo{}
-}
-
-type SourceCodeInfo_Location struct {
- Path []int32 "PB(varint,1,rep,packed,name=path)"
- Span []int32 "PB(varint,2,rep,packed,name=span)"
- XXX_unrecognized []byte
-}
-func (this *SourceCodeInfo_Location) Reset() {
- *this = SourceCodeInfo_Location{}
-}
+func (this *UninterpretedOption_NamePart) Reset() { *this = UninterpretedOption_NamePart{} }
+func (this *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(this) }
func init() {
proto.RegisterEnum("google_protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value)
diff --git a/compiler/descriptor/descriptor.pb.golden b/compiler/descriptor/descriptor.pb.golden
index 6feab4b..507126e 100644
--- a/compiler/descriptor/descriptor.pb.golden
+++ b/compiler/descriptor/descriptor.pb.golden
@@ -12,37 +12,40 @@
var _ = math.Inf
var _ os.Error
+
type FieldDescriptorProto_Type int32
+
const (
- FieldDescriptorProto_TYPE_DOUBLE = 1
- FieldDescriptorProto_TYPE_FLOAT = 2
- FieldDescriptorProto_TYPE_INT64 = 3
- FieldDescriptorProto_TYPE_UINT64 = 4
- FieldDescriptorProto_TYPE_INT32 = 5
- FieldDescriptorProto_TYPE_FIXED64 = 6
- FieldDescriptorProto_TYPE_FIXED32 = 7
- FieldDescriptorProto_TYPE_BOOL = 8
- FieldDescriptorProto_TYPE_STRING = 9
- FieldDescriptorProto_TYPE_GROUP = 10
- FieldDescriptorProto_TYPE_MESSAGE = 11
- FieldDescriptorProto_TYPE_BYTES = 12
- FieldDescriptorProto_TYPE_UINT32 = 13
- FieldDescriptorProto_TYPE_ENUM = 14
+ FieldDescriptorProto_TYPE_DOUBLE = 1
+ FieldDescriptorProto_TYPE_FLOAT = 2
+ FieldDescriptorProto_TYPE_INT64 = 3
+ FieldDescriptorProto_TYPE_UINT64 = 4
+ FieldDescriptorProto_TYPE_INT32 = 5
+ FieldDescriptorProto_TYPE_FIXED64 = 6
+ FieldDescriptorProto_TYPE_FIXED32 = 7
+ FieldDescriptorProto_TYPE_BOOL = 8
+ FieldDescriptorProto_TYPE_STRING = 9
+ FieldDescriptorProto_TYPE_GROUP = 10
+ FieldDescriptorProto_TYPE_MESSAGE = 11
+ FieldDescriptorProto_TYPE_BYTES = 12
+ FieldDescriptorProto_TYPE_UINT32 = 13
+ FieldDescriptorProto_TYPE_ENUM = 14
FieldDescriptorProto_TYPE_SFIXED32 = 15
FieldDescriptorProto_TYPE_SFIXED64 = 16
- FieldDescriptorProto_TYPE_SINT32 = 17
- FieldDescriptorProto_TYPE_SINT64 = 18
+ FieldDescriptorProto_TYPE_SINT32 = 17
+ FieldDescriptorProto_TYPE_SINT64 = 18
)
-var FieldDescriptorProto_Type_name = map[int32] string {
- 1: "TYPE_DOUBLE",
- 2: "TYPE_FLOAT",
- 3: "TYPE_INT64",
- 4: "TYPE_UINT64",
- 5: "TYPE_INT32",
- 6: "TYPE_FIXED64",
- 7: "TYPE_FIXED32",
- 8: "TYPE_BOOL",
- 9: "TYPE_STRING",
+
+var FieldDescriptorProto_Type_name = map[int32]string{
+ 1: "TYPE_DOUBLE",
+ 2: "TYPE_FLOAT",
+ 3: "TYPE_INT64",
+ 4: "TYPE_UINT64",
+ 5: "TYPE_INT32",
+ 6: "TYPE_FIXED64",
+ 7: "TYPE_FIXED32",
+ 8: "TYPE_BOOL",
+ 9: "TYPE_STRING",
10: "TYPE_GROUP",
11: "TYPE_MESSAGE",
12: "TYPE_BYTES",
@@ -53,218 +56,239 @@
17: "TYPE_SINT32",
18: "TYPE_SINT64",
}
-var FieldDescriptorProto_Type_value = map[string] int32 {
- "TYPE_DOUBLE": 1,
- "TYPE_FLOAT": 2,
- "TYPE_INT64": 3,
- "TYPE_UINT64": 4,
- "TYPE_INT32": 5,
- "TYPE_FIXED64": 6,
- "TYPE_FIXED32": 7,
- "TYPE_BOOL": 8,
- "TYPE_STRING": 9,
- "TYPE_GROUP": 10,
- "TYPE_MESSAGE": 11,
- "TYPE_BYTES": 12,
- "TYPE_UINT32": 13,
- "TYPE_ENUM": 14,
+var FieldDescriptorProto_Type_value = map[string]int32{
+ "TYPE_DOUBLE": 1,
+ "TYPE_FLOAT": 2,
+ "TYPE_INT64": 3,
+ "TYPE_UINT64": 4,
+ "TYPE_INT32": 5,
+ "TYPE_FIXED64": 6,
+ "TYPE_FIXED32": 7,
+ "TYPE_BOOL": 8,
+ "TYPE_STRING": 9,
+ "TYPE_GROUP": 10,
+ "TYPE_MESSAGE": 11,
+ "TYPE_BYTES": 12,
+ "TYPE_UINT32": 13,
+ "TYPE_ENUM": 14,
"TYPE_SFIXED32": 15,
"TYPE_SFIXED64": 16,
- "TYPE_SINT32": 17,
- "TYPE_SINT64": 18,
+ "TYPE_SINT32": 17,
+ "TYPE_SINT64": 18,
}
+
func NewFieldDescriptorProto_Type(x int32) *FieldDescriptorProto_Type {
e := FieldDescriptorProto_Type(x)
return &e
}
+func (x FieldDescriptorProto_Type) String() string {
+ return proto.EnumName(FieldDescriptorProto_Type_name, int32(x))
+}
type FieldDescriptorProto_Label int32
+
const (
FieldDescriptorProto_LABEL_OPTIONAL = 1
FieldDescriptorProto_LABEL_REQUIRED = 2
FieldDescriptorProto_LABEL_REPEATED = 3
)
-var FieldDescriptorProto_Label_name = map[int32] string {
+
+var FieldDescriptorProto_Label_name = map[int32]string{
1: "LABEL_OPTIONAL",
2: "LABEL_REQUIRED",
3: "LABEL_REPEATED",
}
-var FieldDescriptorProto_Label_value = map[string] int32 {
+var FieldDescriptorProto_Label_value = map[string]int32{
"LABEL_OPTIONAL": 1,
"LABEL_REQUIRED": 2,
"LABEL_REPEATED": 3,
}
+
func NewFieldDescriptorProto_Label(x int32) *FieldDescriptorProto_Label {
e := FieldDescriptorProto_Label(x)
return &e
}
+func (x FieldDescriptorProto_Label) String() string {
+ return proto.EnumName(FieldDescriptorProto_Label_name, int32(x))
+}
type FileOptions_OptimizeMode int32
+
const (
- FileOptions_SPEED = 1
- FileOptions_CODE_SIZE = 2
+ FileOptions_SPEED = 1
+ FileOptions_CODE_SIZE = 2
FileOptions_LITE_RUNTIME = 3
)
-var FileOptions_OptimizeMode_name = map[int32] string {
+
+var FileOptions_OptimizeMode_name = map[int32]string{
1: "SPEED",
2: "CODE_SIZE",
3: "LITE_RUNTIME",
}
-var FileOptions_OptimizeMode_value = map[string] int32 {
- "SPEED": 1,
- "CODE_SIZE": 2,
+var FileOptions_OptimizeMode_value = map[string]int32{
+ "SPEED": 1,
+ "CODE_SIZE": 2,
"LITE_RUNTIME": 3,
}
+
func NewFileOptions_OptimizeMode(x int32) *FileOptions_OptimizeMode {
e := FileOptions_OptimizeMode(x)
return &e
}
+func (x FileOptions_OptimizeMode) String() string {
+ return proto.EnumName(FileOptions_OptimizeMode_name, int32(x))
+}
type FieldOptions_CType int32
+
const (
- FieldOptions_STRING = 0
- FieldOptions_CORD = 1
+ FieldOptions_STRING = 0
+ FieldOptions_CORD = 1
FieldOptions_STRING_PIECE = 2
)
-var FieldOptions_CType_name = map[int32] string {
+
+var FieldOptions_CType_name = map[int32]string{
0: "STRING",
1: "CORD",
2: "STRING_PIECE",
}
-var FieldOptions_CType_value = map[string] int32 {
- "STRING": 0,
- "CORD": 1,
+var FieldOptions_CType_value = map[string]int32{
+ "STRING": 0,
+ "CORD": 1,
"STRING_PIECE": 2,
}
+
func NewFieldOptions_CType(x int32) *FieldOptions_CType {
e := FieldOptions_CType(x)
return &e
}
+func (x FieldOptions_CType) String() string {
+ return proto.EnumName(FieldOptions_CType_name, int32(x))
+}
type FileDescriptorSet struct {
- File []*FileDescriptorProto "PB(bytes,1,rep,name=file)"
- XXX_unrecognized []byte
+ File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file"`
+ XXX_unrecognized []byte
}
-func (this *FileDescriptorSet) Reset() {
- *this = FileDescriptorSet{}
-}
+
+func (this *FileDescriptorSet) Reset() { *this = FileDescriptorSet{} }
+func (this *FileDescriptorSet) String() string { return proto.CompactTextString(this) }
type FileDescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- Package *string "PB(bytes,2,opt,name=package)"
- Dependency []string "PB(bytes,3,rep,name=dependency)"
- PublicDependency []int32 "PB(varint,10,rep,name=public_dependency)"
- MessageType []*DescriptorProto "PB(bytes,4,rep,name=message_type)"
- EnumType []*EnumDescriptorProto "PB(bytes,5,rep,name=enum_type)"
- Service []*ServiceDescriptorProto "PB(bytes,6,rep,name=service)"
- Extension []*FieldDescriptorProto "PB(bytes,7,rep,name=extension)"
- Options *FileOptions "PB(bytes,8,opt,name=options)"
- SourceCodeInfo *SourceCodeInfo "PB(bytes,9,opt,name=source_code_info)"
- XXX_unrecognized []byte
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ Package *string `protobuf:"bytes,2,opt,name=package"`
+ Dependency []string `protobuf:"bytes,3,rep,name=dependency"`
+ PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency"`
+ MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type"`
+ EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type"`
+ Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service"`
+ Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension"`
+ Options *FileOptions `protobuf:"bytes,8,opt,name=options"`
+ XXX_unrecognized []byte
}
-func (this *FileDescriptorProto) Reset() {
- *this = FileDescriptorProto{}
-}
+
+func (this *FileDescriptorProto) Reset() { *this = FileDescriptorProto{} }
+func (this *FileDescriptorProto) String() string { return proto.CompactTextString(this) }
type DescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- Field []*FieldDescriptorProto "PB(bytes,2,rep,name=field)"
- Extension []*FieldDescriptorProto "PB(bytes,6,rep,name=extension)"
- NestedType []*DescriptorProto "PB(bytes,3,rep,name=nested_type)"
- EnumType []*EnumDescriptorProto "PB(bytes,4,rep,name=enum_type)"
- ExtensionRange []*DescriptorProto_ExtensionRange "PB(bytes,5,rep,name=extension_range)"
- Options *MessageOptions "PB(bytes,7,opt,name=options)"
- XXX_unrecognized []byte
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field"`
+ Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension"`
+ NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type"`
+ EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type"`
+ ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range"`
+ Options *MessageOptions `protobuf:"bytes,7,opt,name=options"`
+ XXX_unrecognized []byte
}
-func (this *DescriptorProto) Reset() {
- *this = DescriptorProto{}
-}
+
+func (this *DescriptorProto) Reset() { *this = DescriptorProto{} }
+func (this *DescriptorProto) String() string { return proto.CompactTextString(this) }
type DescriptorProto_ExtensionRange struct {
- Start *int32 "PB(varint,1,opt,name=start)"
- End *int32 "PB(varint,2,opt,name=end)"
- XXX_unrecognized []byte
+ Start *int32 `protobuf:"varint,1,opt,name=start"`
+ End *int32 `protobuf:"varint,2,opt,name=end"`
+ XXX_unrecognized []byte
}
-func (this *DescriptorProto_ExtensionRange) Reset() {
- *this = DescriptorProto_ExtensionRange{}
-}
+
+func (this *DescriptorProto_ExtensionRange) Reset() { *this = DescriptorProto_ExtensionRange{} }
+func (this *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(this) }
type FieldDescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- Number *int32 "PB(varint,3,opt,name=number)"
- Label *FieldDescriptorProto_Label "PB(varint,4,opt,name=label,enum=google_protobuf.FieldDescriptorProto_Label)"
- Type *FieldDescriptorProto_Type "PB(varint,5,opt,name=type,enum=google_protobuf.FieldDescriptorProto_Type)"
- TypeName *string "PB(bytes,6,opt,name=type_name)"
- Extendee *string "PB(bytes,2,opt,name=extendee)"
- DefaultValue *string "PB(bytes,7,opt,name=default_value)"
- Options *FieldOptions "PB(bytes,8,opt,name=options)"
- XXX_unrecognized []byte
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ Number *int32 `protobuf:"varint,3,opt,name=number"`
+ Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google_protobuf.FieldDescriptorProto_Label"`
+ Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google_protobuf.FieldDescriptorProto_Type"`
+ TypeName *string `protobuf:"bytes,6,opt,name=type_name"`
+ Extendee *string `protobuf:"bytes,2,opt,name=extendee"`
+ DefaultValue *string `protobuf:"bytes,7,opt,name=default_value"`
+ Options *FieldOptions `protobuf:"bytes,8,opt,name=options"`
+ XXX_unrecognized []byte
}
-func (this *FieldDescriptorProto) Reset() {
- *this = FieldDescriptorProto{}
-}
+
+func (this *FieldDescriptorProto) Reset() { *this = FieldDescriptorProto{} }
+func (this *FieldDescriptorProto) String() string { return proto.CompactTextString(this) }
type EnumDescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- Value []*EnumValueDescriptorProto "PB(bytes,2,rep,name=value)"
- Options *EnumOptions "PB(bytes,3,opt,name=options)"
- XXX_unrecognized []byte
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value"`
+ Options *EnumOptions `protobuf:"bytes,3,opt,name=options"`
+ XXX_unrecognized []byte
}
-func (this *EnumDescriptorProto) Reset() {
- *this = EnumDescriptorProto{}
-}
+
+func (this *EnumDescriptorProto) Reset() { *this = EnumDescriptorProto{} }
+func (this *EnumDescriptorProto) String() string { return proto.CompactTextString(this) }
type EnumValueDescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- Number *int32 "PB(varint,2,opt,name=number)"
- Options *EnumValueOptions "PB(bytes,3,opt,name=options)"
- XXX_unrecognized []byte
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ Number *int32 `protobuf:"varint,2,opt,name=number"`
+ Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options"`
+ XXX_unrecognized []byte
}
-func (this *EnumValueDescriptorProto) Reset() {
- *this = EnumValueDescriptorProto{}
-}
+
+func (this *EnumValueDescriptorProto) Reset() { *this = EnumValueDescriptorProto{} }
+func (this *EnumValueDescriptorProto) String() string { return proto.CompactTextString(this) }
type ServiceDescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- Method []*MethodDescriptorProto "PB(bytes,2,rep,name=method)"
- Options *ServiceOptions "PB(bytes,3,opt,name=options)"
- XXX_unrecognized []byte
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method"`
+ Options *ServiceOptions `protobuf:"bytes,3,opt,name=options"`
+ XXX_unrecognized []byte
}
-func (this *ServiceDescriptorProto) Reset() {
- *this = ServiceDescriptorProto{}
-}
+
+func (this *ServiceDescriptorProto) Reset() { *this = ServiceDescriptorProto{} }
+func (this *ServiceDescriptorProto) String() string { return proto.CompactTextString(this) }
type MethodDescriptorProto struct {
- Name *string "PB(bytes,1,opt,name=name)"
- InputType *string "PB(bytes,2,opt,name=input_type)"
- OutputType *string "PB(bytes,3,opt,name=output_type)"
- Options *MethodOptions "PB(bytes,4,opt,name=options)"
- XXX_unrecognized []byte
-}
-func (this *MethodDescriptorProto) Reset() {
- *this = MethodDescriptorProto{}
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ InputType *string `protobuf:"bytes,2,opt,name=input_type"`
+ OutputType *string `protobuf:"bytes,3,opt,name=output_type"`
+ Options *MethodOptions `protobuf:"bytes,4,opt,name=options"`
+ XXX_unrecognized []byte
}
+func (this *MethodDescriptorProto) Reset() { *this = MethodDescriptorProto{} }
+func (this *MethodDescriptorProto) String() string { return proto.CompactTextString(this) }
+
type FileOptions struct {
- JavaPackage *string "PB(bytes,1,opt,name=java_package)"
- JavaOuterClassname *string "PB(bytes,8,opt,name=java_outer_classname)"
- JavaMultipleFiles *bool "PB(varint,10,opt,name=java_multiple_files,def=0)"
- JavaGenerateEqualsAndHash *bool "PB(varint,20,opt,name=java_generate_equals_and_hash,def=0)"
- OptimizeFor *FileOptions_OptimizeMode "PB(varint,9,opt,name=optimize_for,enum=google_protobuf.FileOptions_OptimizeMode,def=1)"
- CcGenericServices *bool "PB(varint,16,opt,name=cc_generic_services,def=0)"
- JavaGenericServices *bool "PB(varint,17,opt,name=java_generic_services,def=0)"
- PyGenericServices *bool "PB(varint,18,opt,name=py_generic_services,def=0)"
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ JavaPackage *string `protobuf:"bytes,1,opt,name=java_package"`
+ JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname"`
+ JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,def=0"`
+ OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,enum=google_protobuf.FileOptions_OptimizeMode,def=1"`
+ CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,def=1"`
+ JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,def=1"`
+ PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,def=1"`
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *FileOptions) Reset() {
- *this = FileOptions{}
-}
+
+func (this *FileOptions) Reset() { *this = FileOptions{} }
+func (this *FileOptions) String() string { return proto.CompactTextString(this) }
var extRange_FileOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_FileOptions
}
@@ -274,27 +298,28 @@
}
return this.XXX_extensions
}
+
const Default_FileOptions_JavaMultipleFiles bool = false
-const Default_FileOptions_JavaGenerateEqualsAndHash bool = false
const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED
-const Default_FileOptions_CcGenericServices bool = false
-const Default_FileOptions_JavaGenericServices bool = false
-const Default_FileOptions_PyGenericServices bool = false
+const Default_FileOptions_CcGenericServices bool = true
+const Default_FileOptions_JavaGenericServices bool = true
+const Default_FileOptions_PyGenericServices bool = true
type MessageOptions struct {
- MessageSetWireFormat *bool "PB(varint,1,opt,name=message_set_wire_format,def=0)"
- NoStandardDescriptorAccessor *bool "PB(varint,2,opt,name=no_standard_descriptor_accessor,def=0)"
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,def=0"`
+ NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,def=0"`
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *MessageOptions) Reset() {
- *this = MessageOptions{}
-}
+
+func (this *MessageOptions) Reset() { *this = MessageOptions{} }
+func (this *MessageOptions) String() string { return proto.CompactTextString(this) }
var extRange_MessageOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_MessageOptions
}
@@ -304,25 +329,27 @@
}
return this.XXX_extensions
}
+
const Default_MessageOptions_MessageSetWireFormat bool = false
const Default_MessageOptions_NoStandardDescriptorAccessor bool = false
type FieldOptions struct {
- Ctype *FieldOptions_CType "PB(varint,1,opt,name=ctype,enum=google_protobuf.FieldOptions_CType,def=0)"
- Packed *bool "PB(varint,2,opt,name=packed)"
- Deprecated *bool "PB(varint,3,opt,name=deprecated,def=0)"
- ExperimentalMapKey *string "PB(bytes,9,opt,name=experimental_map_key)"
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google_protobuf.FieldOptions_CType,def=0"`
+ Packed *bool `protobuf:"varint,2,opt,name=packed"`
+ Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0"`
+ ExperimentalMapKey *string `protobuf:"bytes,9,opt,name=experimental_map_key"`
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *FieldOptions) Reset() {
- *this = FieldOptions{}
-}
+
+func (this *FieldOptions) Reset() { *this = FieldOptions{} }
+func (this *FieldOptions) String() string { return proto.CompactTextString(this) }
var extRange_FieldOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_FieldOptions
}
@@ -332,21 +359,23 @@
}
return this.XXX_extensions
}
+
const Default_FieldOptions_Ctype FieldOptions_CType = FieldOptions_STRING
const Default_FieldOptions_Deprecated bool = false
type EnumOptions struct {
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *EnumOptions) Reset() {
- *this = EnumOptions{}
-}
+
+func (this *EnumOptions) Reset() { *this = EnumOptions{} }
+func (this *EnumOptions) String() string { return proto.CompactTextString(this) }
var extRange_EnumOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_EnumOptions
}
@@ -358,17 +387,18 @@
}
type EnumValueOptions struct {
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *EnumValueOptions) Reset() {
- *this = EnumValueOptions{}
-}
+
+func (this *EnumValueOptions) Reset() { *this = EnumValueOptions{} }
+func (this *EnumValueOptions) String() string { return proto.CompactTextString(this) }
var extRange_EnumValueOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_EnumValueOptions
}
@@ -380,17 +410,18 @@
}
type ServiceOptions struct {
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *ServiceOptions) Reset() {
- *this = ServiceOptions{}
-}
+
+func (this *ServiceOptions) Reset() { *this = ServiceOptions{} }
+func (this *ServiceOptions) String() string { return proto.CompactTextString(this) }
var extRange_ServiceOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_ServiceOptions
}
@@ -402,17 +433,18 @@
}
type MethodOptions struct {
- UninterpretedOption []*UninterpretedOption "PB(bytes,999,rep,name=uninterpreted_option)"
- XXX_extensions map[int32][]byte
- XXX_unrecognized []byte
+ UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option"`
+ XXX_extensions map[int32][]byte
+ XXX_unrecognized []byte
}
-func (this *MethodOptions) Reset() {
- *this = MethodOptions{}
-}
+
+func (this *MethodOptions) Reset() { *this = MethodOptions{} }
+func (this *MethodOptions) String() string { return proto.CompactTextString(this) }
var extRange_MethodOptions = []proto.ExtensionRange{
proto.ExtensionRange{1000, 536870911},
}
+
func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_MethodOptions
}
@@ -424,44 +456,26 @@
}
type UninterpretedOption struct {
- Name []*UninterpretedOption_NamePart "PB(bytes,2,rep,name=name)"
- IdentifierValue *string "PB(bytes,3,opt,name=identifier_value)"
- PositiveIntValue *uint64 "PB(varint,4,opt,name=positive_int_value)"
- NegativeIntValue *int64 "PB(varint,5,opt,name=negative_int_value)"
- DoubleValue *float64 "PB(fixed64,6,opt,name=double_value)"
- StringValue []byte "PB(bytes,7,opt,name=string_value)"
- AggregateValue *string "PB(bytes,8,opt,name=aggregate_value)"
- XXX_unrecognized []byte
+ Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name"`
+ IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value"`
+ PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value"`
+ NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value"`
+ DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value"`
+ StringValue []byte `protobuf:"bytes,7,opt,name=string_value"`
+ XXX_unrecognized []byte
}
-func (this *UninterpretedOption) Reset() {
- *this = UninterpretedOption{}
-}
+
+func (this *UninterpretedOption) Reset() { *this = UninterpretedOption{} }
+func (this *UninterpretedOption) String() string { return proto.CompactTextString(this) }
type UninterpretedOption_NamePart struct {
- NamePart *string "PB(bytes,1,req,name=name_part)"
- IsExtension *bool "PB(varint,2,req,name=is_extension)"
- XXX_unrecognized []byte
-}
-func (this *UninterpretedOption_NamePart) Reset() {
- *this = UninterpretedOption_NamePart{}
+ NamePart *string `protobuf:"bytes,1,req,name=name_part"`
+ IsExtension *bool `protobuf:"varint,2,req,name=is_extension"`
+ XXX_unrecognized []byte
}
-type SourceCodeInfo struct {
- Location []*SourceCodeInfo_Location "PB(bytes,1,rep,name=location)"
- XXX_unrecognized []byte
-}
-func (this *SourceCodeInfo) Reset() {
- *this = SourceCodeInfo{}
-}
-
-type SourceCodeInfo_Location struct {
- Path []int32 "PB(varint,1,rep,packed,name=path)"
- Span []int32 "PB(varint,2,rep,packed,name=span)"
- XXX_unrecognized []byte
-}
-func (this *SourceCodeInfo_Location) Reset() {
- *this = SourceCodeInfo_Location{}
-}
+func (this *UninterpretedOption_NamePart) Reset() { *this = UninterpretedOption_NamePart{} }
+func (this *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(this) }
func init() {
proto.RegisterEnum("google_protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value)
diff --git a/compiler/generator/generator.go b/compiler/generator/generator.go
index 884fef1..b902a1d 100644
--- a/compiler/generator/generator.go
+++ b/compiler/generator/generator.go
@@ -359,7 +359,7 @@
// It then sets file name mappings defined by those entries.
func (g *Generator) CommandLineParameters(parameter string) {
g.Param = make(map[string]string)
- for _, p := range strings.Split(parameter, ",", -1) {
+ for _, p := range strings.Split(parameter, ",") {
if i := strings.Index(p, "="); i < 0 {
g.Param[p] = ""
} else {
@@ -847,7 +847,7 @@
g.P()
}
-// The tag is a string like "PB(varint,2,opt,name=fieldname,def=7)" that
+// The tag is a string like "varint,2,opt,name=fieldname,def=7" that
// identifies details of the field for the protocol buffer marshaling and unmarshaling
// code. The fields are:
// wire encoding
@@ -921,7 +921,7 @@
} else {
name = ",name=" + name
}
- return Quote(fmt.Sprintf("PB(%s,%d,%s%s%s%s%s)",
+ return Quote(fmt.Sprintf("%s,%d,%s%s%s%s%s",
wiretype,
proto.GetInt32(field.Number),
optrepreq,
@@ -1030,7 +1030,7 @@
for _, field := range message.Field {
fieldname := CamelCase(*field.Name)
typename, wiretype := g.GoType(message, field)
- tag := g.goTag(field, wiretype)
+ tag := "`protobuf:" + g.goTag(field, wiretype) + "`"
g.P(fieldname, "\t", typename, "\t", tag)
g.RecordTypeUse(proto.GetString(field.TypeName))
}
diff --git a/compiler/plugin/plugin.pb.go b/compiler/plugin/plugin.pb.go
index b39cd97..ac80dc4 100644
--- a/compiler/plugin/plugin.pb.go
+++ b/compiler/plugin/plugin.pb.go
@@ -13,34 +13,35 @@
var _ = math.Inf
var _ os.Error
+
type CodeGeneratorRequest struct {
- FileToGenerate []string "PB(bytes,1,rep,name=file_to_generate)"
- Parameter *string "PB(bytes,2,opt,name=parameter)"
- ProtoFile []*google_protobuf.FileDescriptorProto "PB(bytes,15,rep,name=proto_file)"
+ FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate"`
+ Parameter *string `protobuf:"bytes,2,opt,name=parameter"`
+ ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file"`
XXX_unrecognized []byte
}
-func (this *CodeGeneratorRequest) Reset() {
- *this = CodeGeneratorRequest{}
-}
+
+func (this *CodeGeneratorRequest) Reset() { *this = CodeGeneratorRequest{} }
+func (this *CodeGeneratorRequest) String() string { return proto.CompactTextString(this) }
type CodeGeneratorResponse struct {
- Error *string "PB(bytes,1,opt,name=error)"
- File []*CodeGeneratorResponse_File "PB(bytes,15,rep,name=file)"
+ Error *string `protobuf:"bytes,1,opt,name=error"`
+ File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file"`
XXX_unrecognized []byte
}
-func (this *CodeGeneratorResponse) Reset() {
- *this = CodeGeneratorResponse{}
-}
+func (this *CodeGeneratorResponse) Reset() { *this = CodeGeneratorResponse{} }
+func (this *CodeGeneratorResponse) String() string { return proto.CompactTextString(this) }
+
type CodeGeneratorResponse_File struct {
- Name *string "PB(bytes,1,opt,name=name)"
- InsertionPoint *string "PB(bytes,2,opt,name=insertion_point)"
- Content *string "PB(bytes,15,opt,name=content)"
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point"`
+ Content *string `protobuf:"bytes,15,opt,name=content"`
XXX_unrecognized []byte
}
-func (this *CodeGeneratorResponse_File) Reset() {
- *this = CodeGeneratorResponse_File{}
-}
+
+func (this *CodeGeneratorResponse_File) Reset() { *this = CodeGeneratorResponse_File{} }
+func (this *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(this) }
func init() {
}
diff --git a/compiler/plugin/plugin.pb.golden b/compiler/plugin/plugin.pb.golden
index b39cd97..ac80dc4 100644
--- a/compiler/plugin/plugin.pb.golden
+++ b/compiler/plugin/plugin.pb.golden
@@ -13,34 +13,35 @@
var _ = math.Inf
var _ os.Error
+
type CodeGeneratorRequest struct {
- FileToGenerate []string "PB(bytes,1,rep,name=file_to_generate)"
- Parameter *string "PB(bytes,2,opt,name=parameter)"
- ProtoFile []*google_protobuf.FileDescriptorProto "PB(bytes,15,rep,name=proto_file)"
+ FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate"`
+ Parameter *string `protobuf:"bytes,2,opt,name=parameter"`
+ ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file"`
XXX_unrecognized []byte
}
-func (this *CodeGeneratorRequest) Reset() {
- *this = CodeGeneratorRequest{}
-}
+
+func (this *CodeGeneratorRequest) Reset() { *this = CodeGeneratorRequest{} }
+func (this *CodeGeneratorRequest) String() string { return proto.CompactTextString(this) }
type CodeGeneratorResponse struct {
- Error *string "PB(bytes,1,opt,name=error)"
- File []*CodeGeneratorResponse_File "PB(bytes,15,rep,name=file)"
+ Error *string `protobuf:"bytes,1,opt,name=error"`
+ File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file"`
XXX_unrecognized []byte
}
-func (this *CodeGeneratorResponse) Reset() {
- *this = CodeGeneratorResponse{}
-}
+func (this *CodeGeneratorResponse) Reset() { *this = CodeGeneratorResponse{} }
+func (this *CodeGeneratorResponse) String() string { return proto.CompactTextString(this) }
+
type CodeGeneratorResponse_File struct {
- Name *string "PB(bytes,1,opt,name=name)"
- InsertionPoint *string "PB(bytes,2,opt,name=insertion_point)"
- Content *string "PB(bytes,15,opt,name=content)"
+ Name *string `protobuf:"bytes,1,opt,name=name"`
+ InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point"`
+ Content *string `protobuf:"bytes,15,opt,name=content"`
XXX_unrecognized []byte
}
-func (this *CodeGeneratorResponse_File) Reset() {
- *this = CodeGeneratorResponse_File{}
-}
+
+func (this *CodeGeneratorResponse_File) Reset() { *this = CodeGeneratorResponse_File{} }
+func (this *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(this) }
func init() {
}
diff --git a/compiler/testdata/test.pb.go.golden b/compiler/testdata/test.pb.go.golden
index 50b2f70..0d3c302 100644
--- a/compiler/testdata/test.pb.go.golden
+++ b/compiler/testdata/test.pb.go.golden
@@ -117,13 +117,13 @@
}
type Request struct {
- Key []int64 "PB(varint,1,rep,name=key)"
- ImportedMessage *imp.ImportedMessage "PB(bytes,2,opt,name=imported_message)"
- Hue *Request_Color "PB(varint,3,opt,name=hue,enum=my_test.Request_Color)"
- Hat *HatType "PB(varint,4,opt,name=hat,enum=my_test.HatType,def=1)"
- Owner *imp.ImportedMessage_Owner "PB(varint,6,opt,name=owner,enum=imp.ImportedMessage_Owner)"
- Deadline *float32 "PB(fixed32,7,opt,name=deadline,def=inf)"
- Somegroup *Request_SomeGroup "PB(group,8,opt,name=SomeGroup)"
+ Key []int64 `protobuf:"varint,1,rep,name=key"`
+ ImportedMessage *imp.ImportedMessage `protobuf:"bytes,2,opt,name=imported_message"`
+ Hue *Request_Color `protobuf:"varint,3,opt,name=hue,enum=my_test.Request_Color"`
+ Hat *HatType `protobuf:"varint,4,opt,name=hat,enum=my_test.HatType,def=1"`
+ Owner *imp.ImportedMessage_Owner `protobuf:"varint,6,opt,name=owner,enum=imp.ImportedMessage_Owner"`
+ Deadline *float32 `protobuf:"fixed32,7,opt,name=deadline,def=inf"`
+ Somegroup *Request_SomeGroup `protobuf:"group,8,opt,name=SomeGroup"`
XXX_unrecognized []byte
}
@@ -135,7 +135,7 @@
var Default_Request_Deadline float32 = float32(math.Inf(1))
type Request_SomeGroup struct {
- GroupField *int32 "PB(varint,9,opt,name=group_field)"
+ GroupField *int32 `protobuf:"varint,9,opt,name=group_field"`
XXX_unrecognized []byte
}
@@ -143,8 +143,8 @@
func (this *Request_SomeGroup) String() string { return proto.CompactTextString(this) }
type Reply struct {
- Found []*Reply_Entry "PB(bytes,1,rep,name=found)"
- CompactKeys []int32 "PB(varint,2,rep,packed,name=compact_keys)"
+ Found []*Reply_Entry `protobuf:"bytes,1,rep,name=found"`
+ CompactKeys []int32 `protobuf:"varint,2,rep,packed,name=compact_keys"`
XXX_extensions map[int32][]byte
XXX_unrecognized []byte
}
@@ -167,9 +167,9 @@
}
type Reply_Entry struct {
- KeyThatNeeds_1234Camel_CasIng *int64 "PB(varint,1,req,name=key_that_needs_1234camel_CasIng)"
- Value *int64 "PB(varint,2,opt,name=value,def=7)"
- XMyFieldName_2 *int64 "PB(varint,3,opt,name=_my_field_name_2)"
+ KeyThatNeeds_1234Camel_CasIng *int64 `protobuf:"varint,1,req,name=key_that_needs_1234camel_CasIng"`
+ Value *int64 `protobuf:"varint,2,opt,name=value,def=7"`
+ XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2"`
XXX_unrecognized []byte
}
@@ -190,7 +190,7 @@
ExtensionType: (*float64)(nil),
Field: 101,
Name: "my_test.time",
- Tag: "PB(fixed64,101,opt,name=time)",
+ Tag: "fixed64,101,opt,name=time",
}
type OldReply struct {
@@ -230,7 +230,7 @@
ExtensionType: (*string)(nil),
Field: 103,
Name: "my_test.tag",
- Tag: "PB(bytes,103,opt,name=tag)",
+ Tag: "bytes,103,opt,name=tag",
}
func init() {