Run 'make generate-test-pbs' in proto/ to regenerate proto3.pb.go testdata
diff --git a/proto/proto3_proto/proto3.pb.go b/proto/proto3_proto/proto3.pb.go
index 19383ef..2f2859a 100644
--- a/proto/proto3_proto/proto3.pb.go
+++ b/proto/proto3_proto/proto3.pb.go
@@ -28,7 +28,9 @@
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
-const _ = proto.ProtoPackageIsVersion1
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type Message_Humour int32
@@ -65,10 +67,10 @@
ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount" json:"result_count,omitempty"`
TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman" json:"true_scotsman,omitempty"`
Score float32 `protobuf:"fixed32,9,opt,name=score" json:"score,omitempty"`
- Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"`
- ShortKey []int32 `protobuf:"varint,19,rep,name=short_key,json=shortKey" json:"short_key,omitempty"`
+ Key []uint64 `protobuf:"varint,5,rep,packed,name=key" json:"key,omitempty"`
+ ShortKey []int32 `protobuf:"varint,19,rep,packed,name=short_key,json=shortKey" json:"short_key,omitempty"`
Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"`
- RFunny []Message_Humour `protobuf:"varint,16,rep,name=r_funny,json=rFunny,enum=proto3_proto.Message_Humour" json:"r_funny,omitempty"`
+ RFunny []Message_Humour `protobuf:"varint,16,rep,packed,name=r_funny,json=rFunny,enum=proto3_proto.Message_Humour" json:"r_funny,omitempty"`
Terrain map[string]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Proto2Field *testdata.SubDefaults `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"`
Proto2Value map[string]*testdata.SubDefaults `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
@@ -83,6 +85,69 @@
func (*Message) ProtoMessage() {}
func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
+func (m *Message) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *Message) GetHilarity() Message_Humour {
+ if m != nil {
+ return m.Hilarity
+ }
+ return Message_UNKNOWN
+}
+
+func (m *Message) GetHeightInCm() uint32 {
+ if m != nil {
+ return m.HeightInCm
+ }
+ return 0
+}
+
+func (m *Message) GetData() []byte {
+ if m != nil {
+ return m.Data
+ }
+ return nil
+}
+
+func (m *Message) GetResultCount() int64 {
+ if m != nil {
+ return m.ResultCount
+ }
+ return 0
+}
+
+func (m *Message) GetTrueScotsman() bool {
+ if m != nil {
+ return m.TrueScotsman
+ }
+ return false
+}
+
+func (m *Message) GetScore() float32 {
+ if m != nil {
+ return m.Score
+ }
+ return 0
+}
+
+func (m *Message) GetKey() []uint64 {
+ if m != nil {
+ return m.Key
+ }
+ return nil
+}
+
+func (m *Message) GetShortKey() []int32 {
+ if m != nil {
+ return m.ShortKey
+ }
+ return nil
+}
+
func (m *Message) GetNested() *Nested {
if m != nil {
return m.Nested
@@ -90,6 +155,13 @@
return nil
}
+func (m *Message) GetRFunny() []Message_Humour {
+ if m != nil {
+ return m.RFunny
+ }
+ return nil
+}
+
func (m *Message) GetTerrain() map[string]*Nested {
if m != nil {
return m.Terrain
@@ -149,6 +221,20 @@
func (*Nested) ProtoMessage() {}
func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
+func (m *Nested) GetBunny() string {
+ if m != nil {
+ return m.Bunny
+ }
+ return ""
+}
+
+func (m *Nested) GetCute() bool {
+ if m != nil {
+ return m.Cute
+ }
+ return false
+}
+
type MessageWithMap struct {
ByteMapping map[bool][]byte `protobuf:"bytes,1,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
@@ -172,48 +258,51 @@
proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value)
}
+func init() { proto.RegisterFile("proto3_proto/proto3.proto", fileDescriptor0) }
+
var fileDescriptor0 = []byte{
- // 669 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x53, 0x6d, 0x6f, 0xd3, 0x3a,
- 0x18, 0xbd, 0x7d, 0x4f, 0x9f, 0xa4, 0x5b, 0xae, 0xb7, 0x2b, 0x79, 0xbd, 0x7c, 0x18, 0x45, 0x42,
- 0x13, 0x2f, 0x19, 0x14, 0x21, 0x4d, 0x08, 0x81, 0xb6, 0xb1, 0x89, 0x6a, 0x5d, 0xa9, 0xdc, 0x8d,
- 0x89, 0x4f, 0x51, 0xd2, 0xba, 0x6d, 0x44, 0xe3, 0x54, 0x89, 0x83, 0x94, 0xbf, 0xc3, 0x1f, 0x05,
- 0xbf, 0xa4, 0x5d, 0x36, 0x75, 0xf0, 0x29, 0xf6, 0x79, 0xce, 0xf1, 0xf3, 0xe4, 0xf8, 0x18, 0xf6,
- 0x96, 0x71, 0xc4, 0xa3, 0x37, 0xae, 0xfa, 0x1c, 0xea, 0x8d, 0xa3, 0x3e, 0xc8, 0x2a, 0x96, 0xda,
- 0x7b, 0xb3, 0x28, 0x9a, 0x2d, 0xa8, 0xa6, 0xf8, 0xe9, 0xf4, 0xd0, 0x63, 0x99, 0x26, 0xb6, 0x77,
- 0x38, 0x4d, 0xf8, 0xc4, 0xe3, 0xde, 0xa1, 0x5c, 0x68, 0xb0, 0xf3, 0xab, 0x01, 0x8d, 0x4b, 0x9a,
- 0x24, 0xde, 0x8c, 0x22, 0x04, 0x55, 0xe6, 0x85, 0x14, 0x97, 0xf6, 0x4b, 0x07, 0x4d, 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