github.com/gogo/protobuf@v1.3.2/test/empty-issue70/empty.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: empty.proto 3 4 package empty 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 io "io" 11 math "math" 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 TestRequest struct { 26 XXX_NoUnkeyedLiteral struct{} `json:"-"` 27 XXX_unrecognized []byte `json:"-"` 28 XXX_sizecache int32 `json:"-"` 29 } 30 31 func (m *TestRequest) Reset() { *m = TestRequest{} } 32 func (m *TestRequest) String() string { return proto.CompactTextString(m) } 33 func (*TestRequest) ProtoMessage() {} 34 func (*TestRequest) Descriptor() ([]byte, []int) { 35 return fileDescriptor_2b3147679766dcb8, []int{0} 36 } 37 func (m *TestRequest) XXX_Unmarshal(b []byte) error { 38 return m.Unmarshal(b) 39 } 40 func (m *TestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 41 return xxx_messageInfo_TestRequest.Marshal(b, m, deterministic) 42 } 43 func (m *TestRequest) XXX_Merge(src proto.Message) { 44 xxx_messageInfo_TestRequest.Merge(m, src) 45 } 46 func (m *TestRequest) XXX_Size() int { 47 return xxx_messageInfo_TestRequest.Size(m) 48 } 49 func (m *TestRequest) XXX_DiscardUnknown() { 50 xxx_messageInfo_TestRequest.DiscardUnknown(m) 51 } 52 53 var xxx_messageInfo_TestRequest proto.InternalMessageInfo 54 55 func init() { 56 proto.RegisterType((*TestRequest)(nil), "empty.TestRequest") 57 } 58 59 func init() { proto.RegisterFile("empty.proto", fileDescriptor_2b3147679766dcb8) } 60 61 var fileDescriptor_2b3147679766dcb8 = []byte{ 62 // 92 bytes of a gzipped FileDescriptorProto 63 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0xcd, 0x2d, 0x28, 64 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, 65 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, 66 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0xf1, 0x72, 0x71, 0x87, 0xa4, 0x16, 67 0x97, 0x04, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x38, 0xb1, 0x5c, 0x78, 0x24, 0xc7, 0x08, 0x08, 68 0x00, 0x00, 0xff, 0xff, 0x0e, 0xe3, 0x23, 0x3d, 0x58, 0x00, 0x00, 0x00, 69 } 70 71 func (m *TestRequest) Unmarshal(dAtA []byte) error { 72 l := len(dAtA) 73 iNdEx := 0 74 for iNdEx < l { 75 preIndex := iNdEx 76 var wire uint64 77 for shift := uint(0); ; shift += 7 { 78 if shift >= 64 { 79 return ErrIntOverflowEmpty 80 } 81 if iNdEx >= l { 82 return io.ErrUnexpectedEOF 83 } 84 b := dAtA[iNdEx] 85 iNdEx++ 86 wire |= uint64(b&0x7F) << shift 87 if b < 0x80 { 88 break 89 } 90 } 91 fieldNum := int32(wire >> 3) 92 wireType := int(wire & 0x7) 93 if wireType == 4 { 94 return fmt.Errorf("proto: TestRequest: wiretype end group for non-group") 95 } 96 if fieldNum <= 0 { 97 return fmt.Errorf("proto: TestRequest: illegal tag %d (wire type %d)", fieldNum, wire) 98 } 99 switch fieldNum { 100 default: 101 iNdEx = preIndex 102 skippy, err := skipEmpty(dAtA[iNdEx:]) 103 if err != nil { 104 return err 105 } 106 if (skippy < 0) || (iNdEx+skippy) < 0 { 107 return ErrInvalidLengthEmpty 108 } 109 if (iNdEx + skippy) > l { 110 return io.ErrUnexpectedEOF 111 } 112 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 113 iNdEx += skippy 114 } 115 } 116 117 if iNdEx > l { 118 return io.ErrUnexpectedEOF 119 } 120 return nil 121 } 122 func skipEmpty(dAtA []byte) (n int, err error) { 123 l := len(dAtA) 124 iNdEx := 0 125 depth := 0 126 for iNdEx < l { 127 var wire uint64 128 for shift := uint(0); ; shift += 7 { 129 if shift >= 64 { 130 return 0, ErrIntOverflowEmpty 131 } 132 if iNdEx >= l { 133 return 0, io.ErrUnexpectedEOF 134 } 135 b := dAtA[iNdEx] 136 iNdEx++ 137 wire |= (uint64(b) & 0x7F) << shift 138 if b < 0x80 { 139 break 140 } 141 } 142 wireType := int(wire & 0x7) 143 switch wireType { 144 case 0: 145 for shift := uint(0); ; shift += 7 { 146 if shift >= 64 { 147 return 0, ErrIntOverflowEmpty 148 } 149 if iNdEx >= l { 150 return 0, io.ErrUnexpectedEOF 151 } 152 iNdEx++ 153 if dAtA[iNdEx-1] < 0x80 { 154 break 155 } 156 } 157 case 1: 158 iNdEx += 8 159 case 2: 160 var length int 161 for shift := uint(0); ; shift += 7 { 162 if shift >= 64 { 163 return 0, ErrIntOverflowEmpty 164 } 165 if iNdEx >= l { 166 return 0, io.ErrUnexpectedEOF 167 } 168 b := dAtA[iNdEx] 169 iNdEx++ 170 length |= (int(b) & 0x7F) << shift 171 if b < 0x80 { 172 break 173 } 174 } 175 if length < 0 { 176 return 0, ErrInvalidLengthEmpty 177 } 178 iNdEx += length 179 case 3: 180 depth++ 181 case 4: 182 if depth == 0 { 183 return 0, ErrUnexpectedEndOfGroupEmpty 184 } 185 depth-- 186 case 5: 187 iNdEx += 4 188 default: 189 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 190 } 191 if iNdEx < 0 { 192 return 0, ErrInvalidLengthEmpty 193 } 194 if depth == 0 { 195 return iNdEx, nil 196 } 197 } 198 return 0, io.ErrUnexpectedEOF 199 } 200 201 var ( 202 ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling") 203 ErrIntOverflowEmpty = fmt.Errorf("proto: integer overflow") 204 ErrUnexpectedEndOfGroupEmpty = fmt.Errorf("proto: unexpected end of group") 205 )