github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/evm/types/testdata/testdata.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: testdata.proto 3 4 package testdata 5 6 import ( 7 fmt "fmt" 8 types "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/codec/types" 9 _ "github.com/gogo/protobuf/gogoproto" 10 proto "github.com/gogo/protobuf/proto" 11 io "io" 12 math "math" 13 math_bits "math/bits" 14 ) 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 26 27 type Dog struct { 28 Size_ string `protobuf:"bytes,1,opt,name=size,proto3" json:"size,omitempty"` 29 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` 30 } 31 32 func (m *Dog) Reset() { *m = Dog{} } 33 func (m *Dog) String() string { return proto.CompactTextString(m) } 34 func (*Dog) ProtoMessage() {} 35 func (*Dog) Descriptor() ([]byte, []int) { 36 return fileDescriptor_40c4782d007dfce9, []int{0} 37 } 38 func (m *Dog) XXX_Unmarshal(b []byte) error { 39 return m.Unmarshal(b) 40 } 41 func (m *Dog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 42 if deterministic { 43 return xxx_messageInfo_Dog.Marshal(b, m, deterministic) 44 } else { 45 b = b[:cap(b)] 46 n, err := m.MarshalToSizedBuffer(b) 47 if err != nil { 48 return nil, err 49 } 50 return b[:n], nil 51 } 52 } 53 func (m *Dog) XXX_Merge(src proto.Message) { 54 xxx_messageInfo_Dog.Merge(m, src) 55 } 56 func (m *Dog) XXX_Size() int { 57 return m.Size() 58 } 59 func (m *Dog) XXX_DiscardUnknown() { 60 xxx_messageInfo_Dog.DiscardUnknown(m) 61 } 62 63 var xxx_messageInfo_Dog proto.InternalMessageInfo 64 65 func (m *Dog) GetSize_() string { 66 if m != nil { 67 return m.Size_ 68 } 69 return "" 70 } 71 72 func (m *Dog) GetName() string { 73 if m != nil { 74 return m.Name 75 } 76 return "" 77 } 78 79 type Cat struct { 80 Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` 81 Lives int32 `protobuf:"varint,2,opt,name=lives,proto3" json:"lives,omitempty"` 82 } 83 84 func (m *Cat) Reset() { *m = Cat{} } 85 func (m *Cat) String() string { return proto.CompactTextString(m) } 86 func (*Cat) ProtoMessage() {} 87 func (*Cat) Descriptor() ([]byte, []int) { 88 return fileDescriptor_40c4782d007dfce9, []int{1} 89 } 90 func (m *Cat) XXX_Unmarshal(b []byte) error { 91 return m.Unmarshal(b) 92 } 93 func (m *Cat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 94 if deterministic { 95 return xxx_messageInfo_Cat.Marshal(b, m, deterministic) 96 } else { 97 b = b[:cap(b)] 98 n, err := m.MarshalToSizedBuffer(b) 99 if err != nil { 100 return nil, err 101 } 102 return b[:n], nil 103 } 104 } 105 func (m *Cat) XXX_Merge(src proto.Message) { 106 xxx_messageInfo_Cat.Merge(m, src) 107 } 108 func (m *Cat) XXX_Size() int { 109 return m.Size() 110 } 111 func (m *Cat) XXX_DiscardUnknown() { 112 xxx_messageInfo_Cat.DiscardUnknown(m) 113 } 114 115 var xxx_messageInfo_Cat proto.InternalMessageInfo 116 117 func (m *Cat) GetMoniker() string { 118 if m != nil { 119 return m.Moniker 120 } 121 return "" 122 } 123 124 func (m *Cat) GetLives() int32 { 125 if m != nil { 126 return m.Lives 127 } 128 return 0 129 } 130 131 type HasAnimal struct { 132 Animal *types.Any `protobuf:"bytes,1,opt,name=animal,proto3" json:"animal,omitempty"` 133 X int64 `protobuf:"varint,2,opt,name=x,proto3" json:"x,omitempty"` 134 } 135 136 func (m *HasAnimal) Reset() { *m = HasAnimal{} } 137 func (m *HasAnimal) String() string { return proto.CompactTextString(m) } 138 func (*HasAnimal) ProtoMessage() {} 139 func (*HasAnimal) Descriptor() ([]byte, []int) { 140 return fileDescriptor_40c4782d007dfce9, []int{2} 141 } 142 func (m *HasAnimal) XXX_Unmarshal(b []byte) error { 143 return m.Unmarshal(b) 144 } 145 func (m *HasAnimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 146 if deterministic { 147 return xxx_messageInfo_HasAnimal.Marshal(b, m, deterministic) 148 } else { 149 b = b[:cap(b)] 150 n, err := m.MarshalToSizedBuffer(b) 151 if err != nil { 152 return nil, err 153 } 154 return b[:n], nil 155 } 156 } 157 func (m *HasAnimal) XXX_Merge(src proto.Message) { 158 xxx_messageInfo_HasAnimal.Merge(m, src) 159 } 160 func (m *HasAnimal) XXX_Size() int { 161 return m.Size() 162 } 163 func (m *HasAnimal) XXX_DiscardUnknown() { 164 xxx_messageInfo_HasAnimal.DiscardUnknown(m) 165 } 166 167 var xxx_messageInfo_HasAnimal proto.InternalMessageInfo 168 169 func (m *HasAnimal) GetAnimal() *types.Any { 170 if m != nil { 171 return m.Animal 172 } 173 return nil 174 } 175 176 func (m *HasAnimal) GetX() int64 { 177 if m != nil { 178 return m.X 179 } 180 return 0 181 } 182 183 type HasHasAnimal struct { 184 HasAnimal *types.Any `protobuf:"bytes,1,opt,name=has_animal,json=hasAnimal,proto3" json:"has_animal,omitempty"` 185 } 186 187 func (m *HasHasAnimal) Reset() { *m = HasHasAnimal{} } 188 func (m *HasHasAnimal) String() string { return proto.CompactTextString(m) } 189 func (*HasHasAnimal) ProtoMessage() {} 190 func (*HasHasAnimal) Descriptor() ([]byte, []int) { 191 return fileDescriptor_40c4782d007dfce9, []int{3} 192 } 193 func (m *HasHasAnimal) XXX_Unmarshal(b []byte) error { 194 return m.Unmarshal(b) 195 } 196 func (m *HasHasAnimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 197 if deterministic { 198 return xxx_messageInfo_HasHasAnimal.Marshal(b, m, deterministic) 199 } else { 200 b = b[:cap(b)] 201 n, err := m.MarshalToSizedBuffer(b) 202 if err != nil { 203 return nil, err 204 } 205 return b[:n], nil 206 } 207 } 208 func (m *HasHasAnimal) XXX_Merge(src proto.Message) { 209 xxx_messageInfo_HasHasAnimal.Merge(m, src) 210 } 211 func (m *HasHasAnimal) XXX_Size() int { 212 return m.Size() 213 } 214 func (m *HasHasAnimal) XXX_DiscardUnknown() { 215 xxx_messageInfo_HasHasAnimal.DiscardUnknown(m) 216 } 217 218 var xxx_messageInfo_HasHasAnimal proto.InternalMessageInfo 219 220 func (m *HasHasAnimal) GetHasAnimal() *types.Any { 221 if m != nil { 222 return m.HasAnimal 223 } 224 return nil 225 } 226 227 type HasHasHasAnimal struct { 228 HasHasAnimal *types.Any `protobuf:"bytes,1,opt,name=has_has_animal,json=hasHasAnimal,proto3" json:"has_has_animal,omitempty"` 229 } 230 231 func (m *HasHasHasAnimal) Reset() { *m = HasHasHasAnimal{} } 232 func (m *HasHasHasAnimal) String() string { return proto.CompactTextString(m) } 233 func (*HasHasHasAnimal) ProtoMessage() {} 234 func (*HasHasHasAnimal) Descriptor() ([]byte, []int) { 235 return fileDescriptor_40c4782d007dfce9, []int{4} 236 } 237 func (m *HasHasHasAnimal) XXX_Unmarshal(b []byte) error { 238 return m.Unmarshal(b) 239 } 240 func (m *HasHasHasAnimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 241 if deterministic { 242 return xxx_messageInfo_HasHasHasAnimal.Marshal(b, m, deterministic) 243 } else { 244 b = b[:cap(b)] 245 n, err := m.MarshalToSizedBuffer(b) 246 if err != nil { 247 return nil, err 248 } 249 return b[:n], nil 250 } 251 } 252 func (m *HasHasHasAnimal) XXX_Merge(src proto.Message) { 253 xxx_messageInfo_HasHasHasAnimal.Merge(m, src) 254 } 255 func (m *HasHasHasAnimal) XXX_Size() int { 256 return m.Size() 257 } 258 func (m *HasHasHasAnimal) XXX_DiscardUnknown() { 259 xxx_messageInfo_HasHasHasAnimal.DiscardUnknown(m) 260 } 261 262 var xxx_messageInfo_HasHasHasAnimal proto.InternalMessageInfo 263 264 func (m *HasHasHasAnimal) GetHasHasAnimal() *types.Any { 265 if m != nil { 266 return m.HasHasAnimal 267 } 268 return nil 269 } 270 271 // bad MultiSignature with extra fields 272 type BadMultiSignature struct { 273 Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` 274 MaliciousField []byte `protobuf:"bytes,5,opt,name=malicious_field,json=maliciousField,proto3" json:"malicious_field,omitempty"` 275 XXX_unrecognized []byte `json:"-"` 276 } 277 278 func (m *BadMultiSignature) Reset() { *m = BadMultiSignature{} } 279 func (m *BadMultiSignature) String() string { return proto.CompactTextString(m) } 280 func (*BadMultiSignature) ProtoMessage() {} 281 func (*BadMultiSignature) Descriptor() ([]byte, []int) { 282 return fileDescriptor_40c4782d007dfce9, []int{5} 283 } 284 func (m *BadMultiSignature) XXX_Unmarshal(b []byte) error { 285 return m.Unmarshal(b) 286 } 287 func (m *BadMultiSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 288 if deterministic { 289 return xxx_messageInfo_BadMultiSignature.Marshal(b, m, deterministic) 290 } else { 291 b = b[:cap(b)] 292 n, err := m.MarshalToSizedBuffer(b) 293 if err != nil { 294 return nil, err 295 } 296 return b[:n], nil 297 } 298 } 299 func (m *BadMultiSignature) XXX_Merge(src proto.Message) { 300 xxx_messageInfo_BadMultiSignature.Merge(m, src) 301 } 302 func (m *BadMultiSignature) XXX_Size() int { 303 return m.Size() 304 } 305 func (m *BadMultiSignature) XXX_DiscardUnknown() { 306 xxx_messageInfo_BadMultiSignature.DiscardUnknown(m) 307 } 308 309 var xxx_messageInfo_BadMultiSignature proto.InternalMessageInfo 310 311 func (m *BadMultiSignature) GetSignatures() [][]byte { 312 if m != nil { 313 return m.Signatures 314 } 315 return nil 316 } 317 318 func (m *BadMultiSignature) GetMaliciousField() []byte { 319 if m != nil { 320 return m.MaliciousField 321 } 322 return nil 323 } 324 325 func init() { 326 proto.RegisterType((*Dog)(nil), "testdata.Dog") 327 proto.RegisterType((*Cat)(nil), "testdata.Cat") 328 proto.RegisterType((*HasAnimal)(nil), "testdata.HasAnimal") 329 proto.RegisterType((*HasHasAnimal)(nil), "testdata.HasHasAnimal") 330 proto.RegisterType((*HasHasHasAnimal)(nil), "testdata.HasHasHasAnimal") 331 proto.RegisterType((*BadMultiSignature)(nil), "testdata.BadMultiSignature") 332 } 333 334 func init() { proto.RegisterFile("testdata.proto", fileDescriptor_40c4782d007dfce9) } 335 336 var fileDescriptor_40c4782d007dfce9 = []byte{ 337 // 365 bytes of a gzipped FileDescriptorProto 338 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x4f, 0xc2, 0x40, 339 0x18, 0x86, 0x39, 0x0b, 0x28, 0x9f, 0x0d, 0xc4, 0x0b, 0x43, 0x65, 0xa8, 0xa4, 0x8b, 0x0c, 0xd2, 340 0x26, 0x12, 0x17, 0x36, 0xc0, 0x28, 0x0b, 0x4b, 0xdd, 0x5c, 0xc8, 0x95, 0x1e, 0xed, 0x85, 0xb6, 341 0x67, 0xb8, 0xab, 0x01, 0x7f, 0x85, 0x7f, 0xc1, 0x7f, 0xe3, 0xc8, 0xe8, 0x68, 0xe0, 0x8f, 0x98, 342 0x5e, 0xa9, 0x30, 0x32, 0xf5, 0x7d, 0xdf, 0xaf, 0xef, 0x93, 0xef, 0x92, 0x0f, 0xea, 0x92, 0x0a, 343 0xe9, 0x13, 0x49, 0xec, 0xb7, 0x25, 0x97, 0x1c, 0x5f, 0x14, 0xbe, 0xd5, 0x0c, 0x78, 0xc0, 0x55, 344 0xe8, 0x64, 0x2a, 0x9f, 0xb7, 0xae, 0x03, 0xce, 0x83, 0x88, 0x3a, 0xca, 0x79, 0xe9, 0xdc, 0x21, 345 0xc9, 0x3a, 0x1f, 0x59, 0x5d, 0xd0, 0x1e, 0x79, 0x80, 0x31, 0x94, 0x05, 0xfb, 0xa0, 0x06, 0x6a, 346 0xa3, 0x4e, 0xcd, 0x55, 0x3a, 0xcb, 0x12, 0x12, 0x53, 0xe3, 0x2c, 0xcf, 0x32, 0x6d, 0x3d, 0x80, 347 0x36, 0x22, 0x12, 0x1b, 0x70, 0x1e, 0xf3, 0x84, 0x2d, 0xe8, 0x72, 0xdf, 0x28, 0x2c, 0x6e, 0x42, 348 0x25, 0x62, 0xef, 0x54, 0xa8, 0x56, 0xc5, 0xcd, 0x8d, 0xf5, 0x0c, 0xb5, 0x31, 0x11, 0x83, 0x84, 349 0xc5, 0x24, 0xc2, 0x77, 0x50, 0x25, 0x4a, 0xa9, 0xee, 0xe5, 0x7d, 0xd3, 0xce, 0xd7, 0xb3, 0x8b, 350 0xf5, 0xec, 0x41, 0xb2, 0x76, 0xf7, 0xff, 0x60, 0x1d, 0xd0, 0x4a, 0xc1, 0x34, 0x17, 0xad, 0xac, 351 0x11, 0xe8, 0x63, 0x22, 0x0e, 0xac, 0x1e, 0x40, 0x48, 0xc4, 0xf4, 0x04, 0x5e, 0x2d, 0x2c, 0x4a, 352 0xd6, 0x04, 0x1a, 0x39, 0xe4, 0xc0, 0xe9, 0x43, 0x3d, 0xe3, 0x9c, 0xc8, 0xd2, 0xc3, 0xa3, 0xae, 353 0xe5, 0xc1, 0xd5, 0x90, 0xf8, 0x93, 0x34, 0x92, 0xec, 0x85, 0x05, 0x09, 0x91, 0xe9, 0x92, 0x62, 354 0x13, 0x40, 0x14, 0x46, 0x18, 0xa8, 0xad, 0x75, 0x74, 0xf7, 0x28, 0xc1, 0xb7, 0xd0, 0x88, 0x49, 355 0xc4, 0x66, 0x8c, 0xa7, 0x62, 0x3a, 0x67, 0x34, 0xf2, 0x8d, 0x4a, 0x1b, 0x75, 0x74, 0xb7, 0xfe, 356 0x1f, 0x3f, 0x65, 0x69, 0xbf, 0xbc, 0xf9, 0xba, 0x41, 0xc3, 0xf1, 0xf7, 0xd6, 0x44, 0x9b, 0xad, 357 0x89, 0x7e, 0xb7, 0x26, 0xfa, 0xdc, 0x99, 0xa5, 0xcd, 0xce, 0x2c, 0xfd, 0xec, 0xcc, 0xd2, 0xab, 358 0x1d, 0x30, 0x19, 0xa6, 0x9e, 0x3d, 0xe3, 0xb1, 0x33, 0xe3, 0x22, 0xe6, 0x62, 0xff, 0xe9, 0x0a, 359 0x7f, 0xe1, 0x64, 0x87, 0x91, 0x4a, 0x16, 0x39, 0xc5, 0x85, 0x78, 0x55, 0xf5, 0x92, 0xde, 0x5f, 360 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x51, 0x62, 0x40, 0x44, 0x02, 0x00, 0x00, 361 } 362 363 func (m *Dog) Marshal() (dAtA []byte, err error) { 364 size := m.Size() 365 dAtA = make([]byte, size) 366 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 367 if err != nil { 368 return nil, err 369 } 370 return dAtA[:n], nil 371 } 372 373 func (m *Dog) MarshalTo(dAtA []byte) (int, error) { 374 size := m.Size() 375 return m.MarshalToSizedBuffer(dAtA[:size]) 376 } 377 378 func (m *Dog) MarshalToSizedBuffer(dAtA []byte) (int, error) { 379 i := len(dAtA) 380 _ = i 381 var l int 382 _ = l 383 if len(m.Name) > 0 { 384 i -= len(m.Name) 385 copy(dAtA[i:], m.Name) 386 i = encodeVarintTestdata(dAtA, i, uint64(len(m.Name))) 387 i-- 388 dAtA[i] = 0x12 389 } 390 if len(m.Size_) > 0 { 391 i -= len(m.Size_) 392 copy(dAtA[i:], m.Size_) 393 i = encodeVarintTestdata(dAtA, i, uint64(len(m.Size_))) 394 i-- 395 dAtA[i] = 0xa 396 } 397 return len(dAtA) - i, nil 398 } 399 400 func (m *Cat) Marshal() (dAtA []byte, err error) { 401 size := m.Size() 402 dAtA = make([]byte, size) 403 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 404 if err != nil { 405 return nil, err 406 } 407 return dAtA[:n], nil 408 } 409 410 func (m *Cat) MarshalTo(dAtA []byte) (int, error) { 411 size := m.Size() 412 return m.MarshalToSizedBuffer(dAtA[:size]) 413 } 414 415 func (m *Cat) MarshalToSizedBuffer(dAtA []byte) (int, error) { 416 i := len(dAtA) 417 _ = i 418 var l int 419 _ = l 420 if m.Lives != 0 { 421 i = encodeVarintTestdata(dAtA, i, uint64(m.Lives)) 422 i-- 423 dAtA[i] = 0x10 424 } 425 if len(m.Moniker) > 0 { 426 i -= len(m.Moniker) 427 copy(dAtA[i:], m.Moniker) 428 i = encodeVarintTestdata(dAtA, i, uint64(len(m.Moniker))) 429 i-- 430 dAtA[i] = 0xa 431 } 432 return len(dAtA) - i, nil 433 } 434 435 func (m *HasAnimal) Marshal() (dAtA []byte, err error) { 436 size := m.Size() 437 dAtA = make([]byte, size) 438 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 439 if err != nil { 440 return nil, err 441 } 442 return dAtA[:n], nil 443 } 444 445 func (m *HasAnimal) MarshalTo(dAtA []byte) (int, error) { 446 size := m.Size() 447 return m.MarshalToSizedBuffer(dAtA[:size]) 448 } 449 450 func (m *HasAnimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 451 i := len(dAtA) 452 _ = i 453 var l int 454 _ = l 455 if m.X != 0 { 456 i = encodeVarintTestdata(dAtA, i, uint64(m.X)) 457 i-- 458 dAtA[i] = 0x10 459 } 460 if m.Animal != nil { 461 { 462 size, err := m.Animal.MarshalToSizedBuffer(dAtA[:i]) 463 if err != nil { 464 return 0, err 465 } 466 i -= size 467 i = encodeVarintTestdata(dAtA, i, uint64(size)) 468 } 469 i-- 470 dAtA[i] = 0xa 471 } 472 return len(dAtA) - i, nil 473 } 474 475 func (m *HasHasAnimal) Marshal() (dAtA []byte, err error) { 476 size := m.Size() 477 dAtA = make([]byte, size) 478 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 479 if err != nil { 480 return nil, err 481 } 482 return dAtA[:n], nil 483 } 484 485 func (m *HasHasAnimal) MarshalTo(dAtA []byte) (int, error) { 486 size := m.Size() 487 return m.MarshalToSizedBuffer(dAtA[:size]) 488 } 489 490 func (m *HasHasAnimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 491 i := len(dAtA) 492 _ = i 493 var l int 494 _ = l 495 if m.HasAnimal != nil { 496 { 497 size, err := m.HasAnimal.MarshalToSizedBuffer(dAtA[:i]) 498 if err != nil { 499 return 0, err 500 } 501 i -= size 502 i = encodeVarintTestdata(dAtA, i, uint64(size)) 503 } 504 i-- 505 dAtA[i] = 0xa 506 } 507 return len(dAtA) - i, nil 508 } 509 510 func (m *HasHasHasAnimal) Marshal() (dAtA []byte, err error) { 511 size := m.Size() 512 dAtA = make([]byte, size) 513 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 514 if err != nil { 515 return nil, err 516 } 517 return dAtA[:n], nil 518 } 519 520 func (m *HasHasHasAnimal) MarshalTo(dAtA []byte) (int, error) { 521 size := m.Size() 522 return m.MarshalToSizedBuffer(dAtA[:size]) 523 } 524 525 func (m *HasHasHasAnimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 526 i := len(dAtA) 527 _ = i 528 var l int 529 _ = l 530 if m.HasHasAnimal != nil { 531 { 532 size, err := m.HasHasAnimal.MarshalToSizedBuffer(dAtA[:i]) 533 if err != nil { 534 return 0, err 535 } 536 i -= size 537 i = encodeVarintTestdata(dAtA, i, uint64(size)) 538 } 539 i-- 540 dAtA[i] = 0xa 541 } 542 return len(dAtA) - i, nil 543 } 544 545 func (m *BadMultiSignature) Marshal() (dAtA []byte, err error) { 546 size := m.Size() 547 dAtA = make([]byte, size) 548 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 549 if err != nil { 550 return nil, err 551 } 552 return dAtA[:n], nil 553 } 554 555 func (m *BadMultiSignature) MarshalTo(dAtA []byte) (int, error) { 556 size := m.Size() 557 return m.MarshalToSizedBuffer(dAtA[:size]) 558 } 559 560 func (m *BadMultiSignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { 561 i := len(dAtA) 562 _ = i 563 var l int 564 _ = l 565 if m.XXX_unrecognized != nil { 566 i -= len(m.XXX_unrecognized) 567 copy(dAtA[i:], m.XXX_unrecognized) 568 } 569 if len(m.MaliciousField) > 0 { 570 i -= len(m.MaliciousField) 571 copy(dAtA[i:], m.MaliciousField) 572 i = encodeVarintTestdata(dAtA, i, uint64(len(m.MaliciousField))) 573 i-- 574 dAtA[i] = 0x2a 575 } 576 if len(m.Signatures) > 0 { 577 for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { 578 i -= len(m.Signatures[iNdEx]) 579 copy(dAtA[i:], m.Signatures[iNdEx]) 580 i = encodeVarintTestdata(dAtA, i, uint64(len(m.Signatures[iNdEx]))) 581 i-- 582 dAtA[i] = 0xa 583 } 584 } 585 return len(dAtA) - i, nil 586 } 587 588 func encodeVarintTestdata(dAtA []byte, offset int, v uint64) int { 589 offset -= sovTestdata(v) 590 base := offset 591 for v >= 1<<7 { 592 dAtA[offset] = uint8(v&0x7f | 0x80) 593 v >>= 7 594 offset++ 595 } 596 dAtA[offset] = uint8(v) 597 return base 598 } 599 func (m *Dog) Size() (n int) { 600 if m == nil { 601 return 0 602 } 603 var l int 604 _ = l 605 l = len(m.Size_) 606 if l > 0 { 607 n += 1 + l + sovTestdata(uint64(l)) 608 } 609 l = len(m.Name) 610 if l > 0 { 611 n += 1 + l + sovTestdata(uint64(l)) 612 } 613 return n 614 } 615 616 func (m *Cat) Size() (n int) { 617 if m == nil { 618 return 0 619 } 620 var l int 621 _ = l 622 l = len(m.Moniker) 623 if l > 0 { 624 n += 1 + l + sovTestdata(uint64(l)) 625 } 626 if m.Lives != 0 { 627 n += 1 + sovTestdata(uint64(m.Lives)) 628 } 629 return n 630 } 631 632 func (m *HasAnimal) Size() (n int) { 633 if m == nil { 634 return 0 635 } 636 var l int 637 _ = l 638 if m.Animal != nil { 639 l = m.Animal.Size() 640 n += 1 + l + sovTestdata(uint64(l)) 641 } 642 if m.X != 0 { 643 n += 1 + sovTestdata(uint64(m.X)) 644 } 645 return n 646 } 647 648 func (m *HasHasAnimal) Size() (n int) { 649 if m == nil { 650 return 0 651 } 652 var l int 653 _ = l 654 if m.HasAnimal != nil { 655 l = m.HasAnimal.Size() 656 n += 1 + l + sovTestdata(uint64(l)) 657 } 658 return n 659 } 660 661 func (m *HasHasHasAnimal) Size() (n int) { 662 if m == nil { 663 return 0 664 } 665 var l int 666 _ = l 667 if m.HasHasAnimal != nil { 668 l = m.HasHasAnimal.Size() 669 n += 1 + l + sovTestdata(uint64(l)) 670 } 671 return n 672 } 673 674 func (m *BadMultiSignature) Size() (n int) { 675 if m == nil { 676 return 0 677 } 678 var l int 679 _ = l 680 if len(m.Signatures) > 0 { 681 for _, b := range m.Signatures { 682 l = len(b) 683 n += 1 + l + sovTestdata(uint64(l)) 684 } 685 } 686 l = len(m.MaliciousField) 687 if l > 0 { 688 n += 1 + l + sovTestdata(uint64(l)) 689 } 690 if m.XXX_unrecognized != nil { 691 n += len(m.XXX_unrecognized) 692 } 693 return n 694 } 695 696 func sovTestdata(x uint64) (n int) { 697 return (math_bits.Len64(x|1) + 6) / 7 698 } 699 func sozTestdata(x uint64) (n int) { 700 return sovTestdata(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 701 } 702 func (m *Dog) Unmarshal(dAtA []byte) error { 703 l := len(dAtA) 704 iNdEx := 0 705 for iNdEx < l { 706 preIndex := iNdEx 707 var wire uint64 708 for shift := uint(0); ; shift += 7 { 709 if shift >= 64 { 710 return ErrIntOverflowTestdata 711 } 712 if iNdEx >= l { 713 return io.ErrUnexpectedEOF 714 } 715 b := dAtA[iNdEx] 716 iNdEx++ 717 wire |= uint64(b&0x7F) << shift 718 if b < 0x80 { 719 break 720 } 721 } 722 fieldNum := int32(wire >> 3) 723 wireType := int(wire & 0x7) 724 if wireType == 4 { 725 return fmt.Errorf("proto: Dog: wiretype end group for non-group") 726 } 727 if fieldNum <= 0 { 728 return fmt.Errorf("proto: Dog: illegal tag %d (wire type %d)", fieldNum, wire) 729 } 730 switch fieldNum { 731 case 1: 732 if wireType != 2 { 733 return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) 734 } 735 var stringLen uint64 736 for shift := uint(0); ; shift += 7 { 737 if shift >= 64 { 738 return ErrIntOverflowTestdata 739 } 740 if iNdEx >= l { 741 return io.ErrUnexpectedEOF 742 } 743 b := dAtA[iNdEx] 744 iNdEx++ 745 stringLen |= uint64(b&0x7F) << shift 746 if b < 0x80 { 747 break 748 } 749 } 750 intStringLen := int(stringLen) 751 if intStringLen < 0 { 752 return ErrInvalidLengthTestdata 753 } 754 postIndex := iNdEx + intStringLen 755 if postIndex < 0 { 756 return ErrInvalidLengthTestdata 757 } 758 if postIndex > l { 759 return io.ErrUnexpectedEOF 760 } 761 m.Size_ = string(dAtA[iNdEx:postIndex]) 762 iNdEx = postIndex 763 case 2: 764 if wireType != 2 { 765 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 766 } 767 var stringLen uint64 768 for shift := uint(0); ; shift += 7 { 769 if shift >= 64 { 770 return ErrIntOverflowTestdata 771 } 772 if iNdEx >= l { 773 return io.ErrUnexpectedEOF 774 } 775 b := dAtA[iNdEx] 776 iNdEx++ 777 stringLen |= uint64(b&0x7F) << shift 778 if b < 0x80 { 779 break 780 } 781 } 782 intStringLen := int(stringLen) 783 if intStringLen < 0 { 784 return ErrInvalidLengthTestdata 785 } 786 postIndex := iNdEx + intStringLen 787 if postIndex < 0 { 788 return ErrInvalidLengthTestdata 789 } 790 if postIndex > l { 791 return io.ErrUnexpectedEOF 792 } 793 m.Name = string(dAtA[iNdEx:postIndex]) 794 iNdEx = postIndex 795 default: 796 iNdEx = preIndex 797 skippy, err := skipTestdata(dAtA[iNdEx:]) 798 if err != nil { 799 return err 800 } 801 if (skippy < 0) || (iNdEx+skippy) < 0 { 802 return ErrInvalidLengthTestdata 803 } 804 if (iNdEx + skippy) > l { 805 return io.ErrUnexpectedEOF 806 } 807 iNdEx += skippy 808 } 809 } 810 811 if iNdEx > l { 812 return io.ErrUnexpectedEOF 813 } 814 return nil 815 } 816 func (m *Cat) Unmarshal(dAtA []byte) error { 817 l := len(dAtA) 818 iNdEx := 0 819 for iNdEx < l { 820 preIndex := iNdEx 821 var wire uint64 822 for shift := uint(0); ; shift += 7 { 823 if shift >= 64 { 824 return ErrIntOverflowTestdata 825 } 826 if iNdEx >= l { 827 return io.ErrUnexpectedEOF 828 } 829 b := dAtA[iNdEx] 830 iNdEx++ 831 wire |= uint64(b&0x7F) << shift 832 if b < 0x80 { 833 break 834 } 835 } 836 fieldNum := int32(wire >> 3) 837 wireType := int(wire & 0x7) 838 if wireType == 4 { 839 return fmt.Errorf("proto: Cat: wiretype end group for non-group") 840 } 841 if fieldNum <= 0 { 842 return fmt.Errorf("proto: Cat: illegal tag %d (wire type %d)", fieldNum, wire) 843 } 844 switch fieldNum { 845 case 1: 846 if wireType != 2 { 847 return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) 848 } 849 var stringLen uint64 850 for shift := uint(0); ; shift += 7 { 851 if shift >= 64 { 852 return ErrIntOverflowTestdata 853 } 854 if iNdEx >= l { 855 return io.ErrUnexpectedEOF 856 } 857 b := dAtA[iNdEx] 858 iNdEx++ 859 stringLen |= uint64(b&0x7F) << shift 860 if b < 0x80 { 861 break 862 } 863 } 864 intStringLen := int(stringLen) 865 if intStringLen < 0 { 866 return ErrInvalidLengthTestdata 867 } 868 postIndex := iNdEx + intStringLen 869 if postIndex < 0 { 870 return ErrInvalidLengthTestdata 871 } 872 if postIndex > l { 873 return io.ErrUnexpectedEOF 874 } 875 m.Moniker = string(dAtA[iNdEx:postIndex]) 876 iNdEx = postIndex 877 case 2: 878 if wireType != 0 { 879 return fmt.Errorf("proto: wrong wireType = %d for field Lives", wireType) 880 } 881 m.Lives = 0 882 for shift := uint(0); ; shift += 7 { 883 if shift >= 64 { 884 return ErrIntOverflowTestdata 885 } 886 if iNdEx >= l { 887 return io.ErrUnexpectedEOF 888 } 889 b := dAtA[iNdEx] 890 iNdEx++ 891 m.Lives |= int32(b&0x7F) << shift 892 if b < 0x80 { 893 break 894 } 895 } 896 default: 897 iNdEx = preIndex 898 skippy, err := skipTestdata(dAtA[iNdEx:]) 899 if err != nil { 900 return err 901 } 902 if (skippy < 0) || (iNdEx+skippy) < 0 { 903 return ErrInvalidLengthTestdata 904 } 905 if (iNdEx + skippy) > l { 906 return io.ErrUnexpectedEOF 907 } 908 iNdEx += skippy 909 } 910 } 911 912 if iNdEx > l { 913 return io.ErrUnexpectedEOF 914 } 915 return nil 916 } 917 func (m *HasAnimal) Unmarshal(dAtA []byte) error { 918 l := len(dAtA) 919 iNdEx := 0 920 for iNdEx < l { 921 preIndex := iNdEx 922 var wire uint64 923 for shift := uint(0); ; shift += 7 { 924 if shift >= 64 { 925 return ErrIntOverflowTestdata 926 } 927 if iNdEx >= l { 928 return io.ErrUnexpectedEOF 929 } 930 b := dAtA[iNdEx] 931 iNdEx++ 932 wire |= uint64(b&0x7F) << shift 933 if b < 0x80 { 934 break 935 } 936 } 937 fieldNum := int32(wire >> 3) 938 wireType := int(wire & 0x7) 939 if wireType == 4 { 940 return fmt.Errorf("proto: HasAnimal: wiretype end group for non-group") 941 } 942 if fieldNum <= 0 { 943 return fmt.Errorf("proto: HasAnimal: illegal tag %d (wire type %d)", fieldNum, wire) 944 } 945 switch fieldNum { 946 case 1: 947 if wireType != 2 { 948 return fmt.Errorf("proto: wrong wireType = %d for field Animal", wireType) 949 } 950 var msglen int 951 for shift := uint(0); ; shift += 7 { 952 if shift >= 64 { 953 return ErrIntOverflowTestdata 954 } 955 if iNdEx >= l { 956 return io.ErrUnexpectedEOF 957 } 958 b := dAtA[iNdEx] 959 iNdEx++ 960 msglen |= int(b&0x7F) << shift 961 if b < 0x80 { 962 break 963 } 964 } 965 if msglen < 0 { 966 return ErrInvalidLengthTestdata 967 } 968 postIndex := iNdEx + msglen 969 if postIndex < 0 { 970 return ErrInvalidLengthTestdata 971 } 972 if postIndex > l { 973 return io.ErrUnexpectedEOF 974 } 975 if m.Animal == nil { 976 m.Animal = &types.Any{} 977 } 978 if err := m.Animal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 979 return err 980 } 981 iNdEx = postIndex 982 case 2: 983 if wireType != 0 { 984 return fmt.Errorf("proto: wrong wireType = %d for field X", wireType) 985 } 986 m.X = 0 987 for shift := uint(0); ; shift += 7 { 988 if shift >= 64 { 989 return ErrIntOverflowTestdata 990 } 991 if iNdEx >= l { 992 return io.ErrUnexpectedEOF 993 } 994 b := dAtA[iNdEx] 995 iNdEx++ 996 m.X |= int64(b&0x7F) << shift 997 if b < 0x80 { 998 break 999 } 1000 } 1001 default: 1002 iNdEx = preIndex 1003 skippy, err := skipTestdata(dAtA[iNdEx:]) 1004 if err != nil { 1005 return err 1006 } 1007 if (skippy < 0) || (iNdEx+skippy) < 0 { 1008 return ErrInvalidLengthTestdata 1009 } 1010 if (iNdEx + skippy) > l { 1011 return io.ErrUnexpectedEOF 1012 } 1013 iNdEx += skippy 1014 } 1015 } 1016 1017 if iNdEx > l { 1018 return io.ErrUnexpectedEOF 1019 } 1020 return nil 1021 } 1022 func (m *HasHasAnimal) Unmarshal(dAtA []byte) error { 1023 l := len(dAtA) 1024 iNdEx := 0 1025 for iNdEx < l { 1026 preIndex := iNdEx 1027 var wire uint64 1028 for shift := uint(0); ; shift += 7 { 1029 if shift >= 64 { 1030 return ErrIntOverflowTestdata 1031 } 1032 if iNdEx >= l { 1033 return io.ErrUnexpectedEOF 1034 } 1035 b := dAtA[iNdEx] 1036 iNdEx++ 1037 wire |= uint64(b&0x7F) << shift 1038 if b < 0x80 { 1039 break 1040 } 1041 } 1042 fieldNum := int32(wire >> 3) 1043 wireType := int(wire & 0x7) 1044 if wireType == 4 { 1045 return fmt.Errorf("proto: HasHasAnimal: wiretype end group for non-group") 1046 } 1047 if fieldNum <= 0 { 1048 return fmt.Errorf("proto: HasHasAnimal: illegal tag %d (wire type %d)", fieldNum, wire) 1049 } 1050 switch fieldNum { 1051 case 1: 1052 if wireType != 2 { 1053 return fmt.Errorf("proto: wrong wireType = %d for field HasAnimal", wireType) 1054 } 1055 var msglen int 1056 for shift := uint(0); ; shift += 7 { 1057 if shift >= 64 { 1058 return ErrIntOverflowTestdata 1059 } 1060 if iNdEx >= l { 1061 return io.ErrUnexpectedEOF 1062 } 1063 b := dAtA[iNdEx] 1064 iNdEx++ 1065 msglen |= int(b&0x7F) << shift 1066 if b < 0x80 { 1067 break 1068 } 1069 } 1070 if msglen < 0 { 1071 return ErrInvalidLengthTestdata 1072 } 1073 postIndex := iNdEx + msglen 1074 if postIndex < 0 { 1075 return ErrInvalidLengthTestdata 1076 } 1077 if postIndex > l { 1078 return io.ErrUnexpectedEOF 1079 } 1080 if m.HasAnimal == nil { 1081 m.HasAnimal = &types.Any{} 1082 } 1083 if err := m.HasAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1084 return err 1085 } 1086 iNdEx = postIndex 1087 default: 1088 iNdEx = preIndex 1089 skippy, err := skipTestdata(dAtA[iNdEx:]) 1090 if err != nil { 1091 return err 1092 } 1093 if (skippy < 0) || (iNdEx+skippy) < 0 { 1094 return ErrInvalidLengthTestdata 1095 } 1096 if (iNdEx + skippy) > l { 1097 return io.ErrUnexpectedEOF 1098 } 1099 iNdEx += skippy 1100 } 1101 } 1102 1103 if iNdEx > l { 1104 return io.ErrUnexpectedEOF 1105 } 1106 return nil 1107 } 1108 func (m *HasHasHasAnimal) Unmarshal(dAtA []byte) error { 1109 l := len(dAtA) 1110 iNdEx := 0 1111 for iNdEx < l { 1112 preIndex := iNdEx 1113 var wire uint64 1114 for shift := uint(0); ; shift += 7 { 1115 if shift >= 64 { 1116 return ErrIntOverflowTestdata 1117 } 1118 if iNdEx >= l { 1119 return io.ErrUnexpectedEOF 1120 } 1121 b := dAtA[iNdEx] 1122 iNdEx++ 1123 wire |= uint64(b&0x7F) << shift 1124 if b < 0x80 { 1125 break 1126 } 1127 } 1128 fieldNum := int32(wire >> 3) 1129 wireType := int(wire & 0x7) 1130 if wireType == 4 { 1131 return fmt.Errorf("proto: HasHasHasAnimal: wiretype end group for non-group") 1132 } 1133 if fieldNum <= 0 { 1134 return fmt.Errorf("proto: HasHasHasAnimal: illegal tag %d (wire type %d)", fieldNum, wire) 1135 } 1136 switch fieldNum { 1137 case 1: 1138 if wireType != 2 { 1139 return fmt.Errorf("proto: wrong wireType = %d for field HasHasAnimal", wireType) 1140 } 1141 var msglen int 1142 for shift := uint(0); ; shift += 7 { 1143 if shift >= 64 { 1144 return ErrIntOverflowTestdata 1145 } 1146 if iNdEx >= l { 1147 return io.ErrUnexpectedEOF 1148 } 1149 b := dAtA[iNdEx] 1150 iNdEx++ 1151 msglen |= int(b&0x7F) << shift 1152 if b < 0x80 { 1153 break 1154 } 1155 } 1156 if msglen < 0 { 1157 return ErrInvalidLengthTestdata 1158 } 1159 postIndex := iNdEx + msglen 1160 if postIndex < 0 { 1161 return ErrInvalidLengthTestdata 1162 } 1163 if postIndex > l { 1164 return io.ErrUnexpectedEOF 1165 } 1166 if m.HasHasAnimal == nil { 1167 m.HasHasAnimal = &types.Any{} 1168 } 1169 if err := m.HasHasAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1170 return err 1171 } 1172 iNdEx = postIndex 1173 default: 1174 iNdEx = preIndex 1175 skippy, err := skipTestdata(dAtA[iNdEx:]) 1176 if err != nil { 1177 return err 1178 } 1179 if (skippy < 0) || (iNdEx+skippy) < 0 { 1180 return ErrInvalidLengthTestdata 1181 } 1182 if (iNdEx + skippy) > l { 1183 return io.ErrUnexpectedEOF 1184 } 1185 iNdEx += skippy 1186 } 1187 } 1188 1189 if iNdEx > l { 1190 return io.ErrUnexpectedEOF 1191 } 1192 return nil 1193 } 1194 func (m *BadMultiSignature) Unmarshal(dAtA []byte) error { 1195 l := len(dAtA) 1196 iNdEx := 0 1197 for iNdEx < l { 1198 preIndex := iNdEx 1199 var wire uint64 1200 for shift := uint(0); ; shift += 7 { 1201 if shift >= 64 { 1202 return ErrIntOverflowTestdata 1203 } 1204 if iNdEx >= l { 1205 return io.ErrUnexpectedEOF 1206 } 1207 b := dAtA[iNdEx] 1208 iNdEx++ 1209 wire |= uint64(b&0x7F) << shift 1210 if b < 0x80 { 1211 break 1212 } 1213 } 1214 fieldNum := int32(wire >> 3) 1215 wireType := int(wire & 0x7) 1216 if wireType == 4 { 1217 return fmt.Errorf("proto: BadMultiSignature: wiretype end group for non-group") 1218 } 1219 if fieldNum <= 0 { 1220 return fmt.Errorf("proto: BadMultiSignature: illegal tag %d (wire type %d)", fieldNum, wire) 1221 } 1222 switch fieldNum { 1223 case 1: 1224 if wireType != 2 { 1225 return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) 1226 } 1227 var byteLen int 1228 for shift := uint(0); ; shift += 7 { 1229 if shift >= 64 { 1230 return ErrIntOverflowTestdata 1231 } 1232 if iNdEx >= l { 1233 return io.ErrUnexpectedEOF 1234 } 1235 b := dAtA[iNdEx] 1236 iNdEx++ 1237 byteLen |= int(b&0x7F) << shift 1238 if b < 0x80 { 1239 break 1240 } 1241 } 1242 if byteLen < 0 { 1243 return ErrInvalidLengthTestdata 1244 } 1245 postIndex := iNdEx + byteLen 1246 if postIndex < 0 { 1247 return ErrInvalidLengthTestdata 1248 } 1249 if postIndex > l { 1250 return io.ErrUnexpectedEOF 1251 } 1252 m.Signatures = append(m.Signatures, make([]byte, postIndex-iNdEx)) 1253 copy(m.Signatures[len(m.Signatures)-1], dAtA[iNdEx:postIndex]) 1254 iNdEx = postIndex 1255 case 5: 1256 if wireType != 2 { 1257 return fmt.Errorf("proto: wrong wireType = %d for field MaliciousField", wireType) 1258 } 1259 var byteLen int 1260 for shift := uint(0); ; shift += 7 { 1261 if shift >= 64 { 1262 return ErrIntOverflowTestdata 1263 } 1264 if iNdEx >= l { 1265 return io.ErrUnexpectedEOF 1266 } 1267 b := dAtA[iNdEx] 1268 iNdEx++ 1269 byteLen |= int(b&0x7F) << shift 1270 if b < 0x80 { 1271 break 1272 } 1273 } 1274 if byteLen < 0 { 1275 return ErrInvalidLengthTestdata 1276 } 1277 postIndex := iNdEx + byteLen 1278 if postIndex < 0 { 1279 return ErrInvalidLengthTestdata 1280 } 1281 if postIndex > l { 1282 return io.ErrUnexpectedEOF 1283 } 1284 m.MaliciousField = append(m.MaliciousField[:0], dAtA[iNdEx:postIndex]...) 1285 if m.MaliciousField == nil { 1286 m.MaliciousField = []byte{} 1287 } 1288 iNdEx = postIndex 1289 default: 1290 iNdEx = preIndex 1291 skippy, err := skipTestdata(dAtA[iNdEx:]) 1292 if err != nil { 1293 return err 1294 } 1295 if (skippy < 0) || (iNdEx+skippy) < 0 { 1296 return ErrInvalidLengthTestdata 1297 } 1298 if (iNdEx + skippy) > l { 1299 return io.ErrUnexpectedEOF 1300 } 1301 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1302 iNdEx += skippy 1303 } 1304 } 1305 1306 if iNdEx > l { 1307 return io.ErrUnexpectedEOF 1308 } 1309 return nil 1310 } 1311 func skipTestdata(dAtA []byte) (n int, err error) { 1312 l := len(dAtA) 1313 iNdEx := 0 1314 depth := 0 1315 for iNdEx < l { 1316 var wire uint64 1317 for shift := uint(0); ; shift += 7 { 1318 if shift >= 64 { 1319 return 0, ErrIntOverflowTestdata 1320 } 1321 if iNdEx >= l { 1322 return 0, io.ErrUnexpectedEOF 1323 } 1324 b := dAtA[iNdEx] 1325 iNdEx++ 1326 wire |= (uint64(b) & 0x7F) << shift 1327 if b < 0x80 { 1328 break 1329 } 1330 } 1331 wireType := int(wire & 0x7) 1332 switch wireType { 1333 case 0: 1334 for shift := uint(0); ; shift += 7 { 1335 if shift >= 64 { 1336 return 0, ErrIntOverflowTestdata 1337 } 1338 if iNdEx >= l { 1339 return 0, io.ErrUnexpectedEOF 1340 } 1341 iNdEx++ 1342 if dAtA[iNdEx-1] < 0x80 { 1343 break 1344 } 1345 } 1346 case 1: 1347 iNdEx += 8 1348 case 2: 1349 var length int 1350 for shift := uint(0); ; shift += 7 { 1351 if shift >= 64 { 1352 return 0, ErrIntOverflowTestdata 1353 } 1354 if iNdEx >= l { 1355 return 0, io.ErrUnexpectedEOF 1356 } 1357 b := dAtA[iNdEx] 1358 iNdEx++ 1359 length |= (int(b) & 0x7F) << shift 1360 if b < 0x80 { 1361 break 1362 } 1363 } 1364 if length < 0 { 1365 return 0, ErrInvalidLengthTestdata 1366 } 1367 iNdEx += length 1368 case 3: 1369 depth++ 1370 case 4: 1371 if depth == 0 { 1372 return 0, ErrUnexpectedEndOfGroupTestdata 1373 } 1374 depth-- 1375 case 5: 1376 iNdEx += 4 1377 default: 1378 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1379 } 1380 if iNdEx < 0 { 1381 return 0, ErrInvalidLengthTestdata 1382 } 1383 if depth == 0 { 1384 return iNdEx, nil 1385 } 1386 } 1387 return 0, io.ErrUnexpectedEOF 1388 } 1389 1390 var ( 1391 ErrInvalidLengthTestdata = fmt.Errorf("proto: negative length found during unmarshaling") 1392 ErrIntOverflowTestdata = fmt.Errorf("proto: integer overflow") 1393 ErrUnexpectedEndOfGroupTestdata = fmt.Errorf("proto: unexpected end of group") 1394 )