github.com/gogo/protobuf@v1.3.2/test/issue444/issue444.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: issue444.proto 3 4 package issue444 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 math "math" 11 math_bits "math/bits" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 24 25 type SizeMe struct { 26 Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"` 27 XXX_NoUnkeyedLiteral struct{} `json:"-"` 28 XXX_unrecognized []byte `json:"-"` 29 XXX_sizecache int32 `json:"-"` 30 } 31 32 func (m *SizeMe) Reset() { *m = SizeMe{} } 33 func (m *SizeMe) String() string { return proto.CompactTextString(m) } 34 func (*SizeMe) ProtoMessage() {} 35 func (*SizeMe) Descriptor() ([]byte, []int) { 36 return fileDescriptor_e39b8ab75bd9d8cd, []int{0} 37 } 38 func (m *SizeMe) XXX_Unmarshal(b []byte) error { 39 return xxx_messageInfo_SizeMe.Unmarshal(m, b) 40 } 41 func (m *SizeMe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 42 return xxx_messageInfo_SizeMe.Marshal(b, m, deterministic) 43 } 44 func (m *SizeMe) XXX_Merge(src proto.Message) { 45 xxx_messageInfo_SizeMe.Merge(m, src) 46 } 47 func (m *SizeMe) XXX_Size() int { 48 return xxx_messageInfo_SizeMe.Size(m) 49 } 50 func (m *SizeMe) XXX_DiscardUnknown() { 51 xxx_messageInfo_SizeMe.DiscardUnknown(m) 52 } 53 54 var xxx_messageInfo_SizeMe proto.InternalMessageInfo 55 56 func (m *SizeMe) GetFoo() string { 57 if m != nil { 58 return m.Foo 59 } 60 return "" 61 } 62 63 func init() { 64 proto.RegisterType((*SizeMe)(nil), "issue444.SizeMe") 65 } 66 67 func init() { proto.RegisterFile("issue444.proto", fileDescriptor_e39b8ab75bd9d8cd) } 68 69 var fileDescriptor_e39b8ab75bd9d8cd = []byte{ 70 // 111 bytes of a gzipped FileDescriptorProto 71 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, 72 0x4d, 0x35, 0x31, 0x31, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, 73 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 74 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x92, 0xe2, 0x62, 75 0x0b, 0xce, 0xac, 0x4a, 0xf5, 0x4d, 0x15, 0x12, 0xe0, 0x62, 0x4e, 0xcb, 0xcf, 0x97, 0x60, 0x54, 76 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0x31, 0x9d, 0x58, 0x1e, 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, 0x2b, 77 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xe0, 0xfa, 0x18, 0x73, 0x00, 0x00, 0x00, 78 } 79 80 func (m *SizeMe) Size() (n int) { 81 if m == nil { 82 return 0 83 } 84 var l int 85 _ = l 86 l = len(m.Foo) 87 if l > 0 { 88 n += 1 + l + sovIssue444(uint64(l)) 89 } 90 if m.XXX_unrecognized != nil { 91 n += len(m.XXX_unrecognized) 92 } 93 return n 94 } 95 96 func sovIssue444(x uint64) (n int) { 97 return (math_bits.Len64(x|1) + 6) / 7 98 } 99 func sozIssue444(x uint64) (n int) { 100 return sovIssue444(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 101 }