github.com/Finschia/finschia-sdk@v0.48.1/testutil/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/Finschia/finschia-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 // 370 bytes of a gzipped FileDescriptorProto 338 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xb1, 0x6e, 0xea, 0x30, 339 0x14, 0x86, 0xf1, 0x0d, 0x70, 0x2f, 0xe7, 0x46, 0xa0, 0x6b, 0x31, 0xe4, 0x32, 0xa4, 0x28, 0x4b, 340 0x19, 0x4a, 0x22, 0x81, 0xba, 0xb0, 0x01, 0x15, 0x65, 0x28, 0x4b, 0xba, 0x75, 0x41, 0x0e, 0x31, 341 0x89, 0x45, 0x12, 0x57, 0xd8, 0xa9, 0xa0, 0x4f, 0xd1, 0x57, 0xe8, 0xdb, 0x74, 0x64, 0xec, 0x58, 342 0xc1, 0x8b, 0x54, 0x71, 0x48, 0x61, 0x64, 0xfb, 0xff, 0xff, 0xf8, 0xff, 0x74, 0x2c, 0x1d, 0xa8, 343 0x4b, 0x2a, 0xa4, 0x4f, 0x24, 0xb1, 0x9f, 0xd7, 0x5c, 0x72, 0xfc, 0xa7, 0xf0, 0xad, 0x66, 0xc0, 344 0x03, 0xae, 0x42, 0x27, 0x53, 0xf9, 0xbc, 0xf5, 0x3f, 0xe0, 0x3c, 0x88, 0xa8, 0xa3, 0x9c, 0x97, 345 0x2e, 0x1d, 0x92, 0x6c, 0xf3, 0x91, 0xd5, 0x05, 0xed, 0x8e, 0x07, 0x18, 0x43, 0x59, 0xb0, 0x57, 346 0x6a, 0xa0, 0x36, 0xea, 0xd4, 0x5c, 0xa5, 0xb3, 0x2c, 0x21, 0x31, 0x35, 0x7e, 0xe5, 0x59, 0xa6, 347 0xad, 0x5b, 0xd0, 0xc6, 0x44, 0x62, 0x03, 0x7e, 0xc7, 0x3c, 0x61, 0x2b, 0xba, 0x3e, 0x36, 0x0a, 348 0x8b, 0x9b, 0x50, 0x89, 0xd8, 0x0b, 0x15, 0xaa, 0x55, 0x71, 0x73, 0x63, 0xdd, 0x43, 0x6d, 0x4a, 349 0xc4, 0x30, 0x61, 0x31, 0x89, 0xf0, 0x0d, 0x54, 0x89, 0x52, 0xaa, 0xfb, 0xb7, 0xd7, 0xb4, 0xf3, 350 0xf5, 0xec, 0x62, 0x3d, 0x7b, 0x98, 0x6c, 0xdd, 0xe3, 0x1b, 0xac, 0x03, 0xda, 0x28, 0x98, 0xe6, 351 0xa2, 0x8d, 0x35, 0x06, 0x7d, 0x4a, 0xc4, 0x89, 0xd5, 0x07, 0x08, 0x89, 0x98, 0x5f, 0xc0, 0xab, 352 0x85, 0x45, 0xc9, 0x9a, 0x41, 0x23, 0x87, 0x9c, 0x38, 0x03, 0xa8, 0x67, 0x9c, 0x0b, 0x59, 0x7a, 353 0x78, 0xd6, 0xb5, 0x3c, 0xf8, 0x37, 0x22, 0xfe, 0x2c, 0x8d, 0x24, 0x7b, 0x64, 0x41, 0x42, 0x64, 354 0xba, 0xa6, 0xd8, 0x04, 0x10, 0x85, 0x11, 0x06, 0x6a, 0x6b, 0x1d, 0xdd, 0x3d, 0x4b, 0xf0, 0x35, 355 0x34, 0x62, 0x12, 0xb1, 0x05, 0xe3, 0xa9, 0x98, 0x2f, 0x19, 0x8d, 0x7c, 0xa3, 0xd2, 0x46, 0x1d, 356 0xdd, 0xad, 0xff, 0xc4, 0x93, 0x2c, 0x1d, 0x94, 0x77, 0xef, 0x57, 0x68, 0xf4, 0xf0, 0xb1, 0x37, 357 0xd1, 0x6e, 0x6f, 0xa2, 0xaf, 0xbd, 0x89, 0xde, 0x0e, 0x66, 0x69, 0x77, 0x30, 0x4b, 0x9f, 0x07, 358 0xb3, 0xf4, 0xd4, 0x0b, 0x98, 0x0c, 0x53, 0xcf, 0x5e, 0xf0, 0xd8, 0x99, 0xb0, 0x44, 0x2c, 0x42, 359 0x46, 0x9c, 0xe5, 0x51, 0x74, 0x85, 0xbf, 0x72, 0xb2, 0xe3, 0x48, 0x25, 0x8b, 0x9c, 0xe2, 0x4a, 360 0xbc, 0xaa, 0xfa, 0x4d, 0xff, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x9b, 0x63, 0x05, 0x48, 0x02, 361 0x00, 0x00, 362 } 363 364 func (m *Dog) Marshal() (dAtA []byte, err error) { 365 size := m.Size() 366 dAtA = make([]byte, size) 367 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 368 if err != nil { 369 return nil, err 370 } 371 return dAtA[:n], nil 372 } 373 374 func (m *Dog) MarshalTo(dAtA []byte) (int, error) { 375 size := m.Size() 376 return m.MarshalToSizedBuffer(dAtA[:size]) 377 } 378 379 func (m *Dog) MarshalToSizedBuffer(dAtA []byte) (int, error) { 380 i := len(dAtA) 381 _ = i 382 var l int 383 _ = l 384 if len(m.Name) > 0 { 385 i -= len(m.Name) 386 copy(dAtA[i:], m.Name) 387 i = encodeVarintTestdata(dAtA, i, uint64(len(m.Name))) 388 i-- 389 dAtA[i] = 0x12 390 } 391 if len(m.Size_) > 0 { 392 i -= len(m.Size_) 393 copy(dAtA[i:], m.Size_) 394 i = encodeVarintTestdata(dAtA, i, uint64(len(m.Size_))) 395 i-- 396 dAtA[i] = 0xa 397 } 398 return len(dAtA) - i, nil 399 } 400 401 func (m *Cat) Marshal() (dAtA []byte, err error) { 402 size := m.Size() 403 dAtA = make([]byte, size) 404 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 405 if err != nil { 406 return nil, err 407 } 408 return dAtA[:n], nil 409 } 410 411 func (m *Cat) MarshalTo(dAtA []byte) (int, error) { 412 size := m.Size() 413 return m.MarshalToSizedBuffer(dAtA[:size]) 414 } 415 416 func (m *Cat) MarshalToSizedBuffer(dAtA []byte) (int, error) { 417 i := len(dAtA) 418 _ = i 419 var l int 420 _ = l 421 if m.Lives != 0 { 422 i = encodeVarintTestdata(dAtA, i, uint64(m.Lives)) 423 i-- 424 dAtA[i] = 0x10 425 } 426 if len(m.Moniker) > 0 { 427 i -= len(m.Moniker) 428 copy(dAtA[i:], m.Moniker) 429 i = encodeVarintTestdata(dAtA, i, uint64(len(m.Moniker))) 430 i-- 431 dAtA[i] = 0xa 432 } 433 return len(dAtA) - i, nil 434 } 435 436 func (m *HasAnimal) Marshal() (dAtA []byte, err error) { 437 size := m.Size() 438 dAtA = make([]byte, size) 439 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 440 if err != nil { 441 return nil, err 442 } 443 return dAtA[:n], nil 444 } 445 446 func (m *HasAnimal) MarshalTo(dAtA []byte) (int, error) { 447 size := m.Size() 448 return m.MarshalToSizedBuffer(dAtA[:size]) 449 } 450 451 func (m *HasAnimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 452 i := len(dAtA) 453 _ = i 454 var l int 455 _ = l 456 if m.X != 0 { 457 i = encodeVarintTestdata(dAtA, i, uint64(m.X)) 458 i-- 459 dAtA[i] = 0x10 460 } 461 if m.Animal != nil { 462 { 463 size, err := m.Animal.MarshalToSizedBuffer(dAtA[:i]) 464 if err != nil { 465 return 0, err 466 } 467 i -= size 468 i = encodeVarintTestdata(dAtA, i, uint64(size)) 469 } 470 i-- 471 dAtA[i] = 0xa 472 } 473 return len(dAtA) - i, nil 474 } 475 476 func (m *HasHasAnimal) Marshal() (dAtA []byte, err error) { 477 size := m.Size() 478 dAtA = make([]byte, size) 479 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 480 if err != nil { 481 return nil, err 482 } 483 return dAtA[:n], nil 484 } 485 486 func (m *HasHasAnimal) MarshalTo(dAtA []byte) (int, error) { 487 size := m.Size() 488 return m.MarshalToSizedBuffer(dAtA[:size]) 489 } 490 491 func (m *HasHasAnimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 492 i := len(dAtA) 493 _ = i 494 var l int 495 _ = l 496 if m.HasAnimal != nil { 497 { 498 size, err := m.HasAnimal.MarshalToSizedBuffer(dAtA[:i]) 499 if err != nil { 500 return 0, err 501 } 502 i -= size 503 i = encodeVarintTestdata(dAtA, i, uint64(size)) 504 } 505 i-- 506 dAtA[i] = 0xa 507 } 508 return len(dAtA) - i, nil 509 } 510 511 func (m *HasHasHasAnimal) Marshal() (dAtA []byte, err error) { 512 size := m.Size() 513 dAtA = make([]byte, size) 514 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 515 if err != nil { 516 return nil, err 517 } 518 return dAtA[:n], nil 519 } 520 521 func (m *HasHasHasAnimal) MarshalTo(dAtA []byte) (int, error) { 522 size := m.Size() 523 return m.MarshalToSizedBuffer(dAtA[:size]) 524 } 525 526 func (m *HasHasHasAnimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 527 i := len(dAtA) 528 _ = i 529 var l int 530 _ = l 531 if m.HasHasAnimal != nil { 532 { 533 size, err := m.HasHasAnimal.MarshalToSizedBuffer(dAtA[:i]) 534 if err != nil { 535 return 0, err 536 } 537 i -= size 538 i = encodeVarintTestdata(dAtA, i, uint64(size)) 539 } 540 i-- 541 dAtA[i] = 0xa 542 } 543 return len(dAtA) - i, nil 544 } 545 546 func (m *BadMultiSignature) Marshal() (dAtA []byte, err error) { 547 size := m.Size() 548 dAtA = make([]byte, size) 549 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 550 if err != nil { 551 return nil, err 552 } 553 return dAtA[:n], nil 554 } 555 556 func (m *BadMultiSignature) MarshalTo(dAtA []byte) (int, error) { 557 size := m.Size() 558 return m.MarshalToSizedBuffer(dAtA[:size]) 559 } 560 561 func (m *BadMultiSignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { 562 i := len(dAtA) 563 _ = i 564 var l int 565 _ = l 566 if m.XXX_unrecognized != nil { 567 i -= len(m.XXX_unrecognized) 568 copy(dAtA[i:], m.XXX_unrecognized) 569 } 570 if len(m.MaliciousField) > 0 { 571 i -= len(m.MaliciousField) 572 copy(dAtA[i:], m.MaliciousField) 573 i = encodeVarintTestdata(dAtA, i, uint64(len(m.MaliciousField))) 574 i-- 575 dAtA[i] = 0x2a 576 } 577 if len(m.Signatures) > 0 { 578 for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { 579 i -= len(m.Signatures[iNdEx]) 580 copy(dAtA[i:], m.Signatures[iNdEx]) 581 i = encodeVarintTestdata(dAtA, i, uint64(len(m.Signatures[iNdEx]))) 582 i-- 583 dAtA[i] = 0xa 584 } 585 } 586 return len(dAtA) - i, nil 587 } 588 589 func encodeVarintTestdata(dAtA []byte, offset int, v uint64) int { 590 offset -= sovTestdata(v) 591 base := offset 592 for v >= 1<<7 { 593 dAtA[offset] = uint8(v&0x7f | 0x80) 594 v >>= 7 595 offset++ 596 } 597 dAtA[offset] = uint8(v) 598 return base 599 } 600 func (m *Dog) Size() (n int) { 601 if m == nil { 602 return 0 603 } 604 var l int 605 _ = l 606 l = len(m.Size_) 607 if l > 0 { 608 n += 1 + l + sovTestdata(uint64(l)) 609 } 610 l = len(m.Name) 611 if l > 0 { 612 n += 1 + l + sovTestdata(uint64(l)) 613 } 614 return n 615 } 616 617 func (m *Cat) Size() (n int) { 618 if m == nil { 619 return 0 620 } 621 var l int 622 _ = l 623 l = len(m.Moniker) 624 if l > 0 { 625 n += 1 + l + sovTestdata(uint64(l)) 626 } 627 if m.Lives != 0 { 628 n += 1 + sovTestdata(uint64(m.Lives)) 629 } 630 return n 631 } 632 633 func (m *HasAnimal) Size() (n int) { 634 if m == nil { 635 return 0 636 } 637 var l int 638 _ = l 639 if m.Animal != nil { 640 l = m.Animal.Size() 641 n += 1 + l + sovTestdata(uint64(l)) 642 } 643 if m.X != 0 { 644 n += 1 + sovTestdata(uint64(m.X)) 645 } 646 return n 647 } 648 649 func (m *HasHasAnimal) Size() (n int) { 650 if m == nil { 651 return 0 652 } 653 var l int 654 _ = l 655 if m.HasAnimal != nil { 656 l = m.HasAnimal.Size() 657 n += 1 + l + sovTestdata(uint64(l)) 658 } 659 return n 660 } 661 662 func (m *HasHasHasAnimal) Size() (n int) { 663 if m == nil { 664 return 0 665 } 666 var l int 667 _ = l 668 if m.HasHasAnimal != nil { 669 l = m.HasHasAnimal.Size() 670 n += 1 + l + sovTestdata(uint64(l)) 671 } 672 return n 673 } 674 675 func (m *BadMultiSignature) Size() (n int) { 676 if m == nil { 677 return 0 678 } 679 var l int 680 _ = l 681 if len(m.Signatures) > 0 { 682 for _, b := range m.Signatures { 683 l = len(b) 684 n += 1 + l + sovTestdata(uint64(l)) 685 } 686 } 687 l = len(m.MaliciousField) 688 if l > 0 { 689 n += 1 + l + sovTestdata(uint64(l)) 690 } 691 if m.XXX_unrecognized != nil { 692 n += len(m.XXX_unrecognized) 693 } 694 return n 695 } 696 697 func sovTestdata(x uint64) (n int) { 698 return (math_bits.Len64(x|1) + 6) / 7 699 } 700 func sozTestdata(x uint64) (n int) { 701 return sovTestdata(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 702 } 703 func (m *Dog) Unmarshal(dAtA []byte) error { 704 l := len(dAtA) 705 iNdEx := 0 706 for iNdEx < l { 707 preIndex := iNdEx 708 var wire uint64 709 for shift := uint(0); ; shift += 7 { 710 if shift >= 64 { 711 return ErrIntOverflowTestdata 712 } 713 if iNdEx >= l { 714 return io.ErrUnexpectedEOF 715 } 716 b := dAtA[iNdEx] 717 iNdEx++ 718 wire |= uint64(b&0x7F) << shift 719 if b < 0x80 { 720 break 721 } 722 } 723 fieldNum := int32(wire >> 3) 724 wireType := int(wire & 0x7) 725 if wireType == 4 { 726 return fmt.Errorf("proto: Dog: wiretype end group for non-group") 727 } 728 if fieldNum <= 0 { 729 return fmt.Errorf("proto: Dog: illegal tag %d (wire type %d)", fieldNum, wire) 730 } 731 switch fieldNum { 732 case 1: 733 if wireType != 2 { 734 return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) 735 } 736 var stringLen uint64 737 for shift := uint(0); ; shift += 7 { 738 if shift >= 64 { 739 return ErrIntOverflowTestdata 740 } 741 if iNdEx >= l { 742 return io.ErrUnexpectedEOF 743 } 744 b := dAtA[iNdEx] 745 iNdEx++ 746 stringLen |= uint64(b&0x7F) << shift 747 if b < 0x80 { 748 break 749 } 750 } 751 intStringLen := int(stringLen) 752 if intStringLen < 0 { 753 return ErrInvalidLengthTestdata 754 } 755 postIndex := iNdEx + intStringLen 756 if postIndex < 0 { 757 return ErrInvalidLengthTestdata 758 } 759 if postIndex > l { 760 return io.ErrUnexpectedEOF 761 } 762 m.Size_ = string(dAtA[iNdEx:postIndex]) 763 iNdEx = postIndex 764 case 2: 765 if wireType != 2 { 766 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 767 } 768 var stringLen uint64 769 for shift := uint(0); ; shift += 7 { 770 if shift >= 64 { 771 return ErrIntOverflowTestdata 772 } 773 if iNdEx >= l { 774 return io.ErrUnexpectedEOF 775 } 776 b := dAtA[iNdEx] 777 iNdEx++ 778 stringLen |= uint64(b&0x7F) << shift 779 if b < 0x80 { 780 break 781 } 782 } 783 intStringLen := int(stringLen) 784 if intStringLen < 0 { 785 return ErrInvalidLengthTestdata 786 } 787 postIndex := iNdEx + intStringLen 788 if postIndex < 0 { 789 return ErrInvalidLengthTestdata 790 } 791 if postIndex > l { 792 return io.ErrUnexpectedEOF 793 } 794 m.Name = string(dAtA[iNdEx:postIndex]) 795 iNdEx = postIndex 796 default: 797 iNdEx = preIndex 798 skippy, err := skipTestdata(dAtA[iNdEx:]) 799 if err != nil { 800 return err 801 } 802 if (skippy < 0) || (iNdEx+skippy) < 0 { 803 return ErrInvalidLengthTestdata 804 } 805 if (iNdEx + skippy) > l { 806 return io.ErrUnexpectedEOF 807 } 808 iNdEx += skippy 809 } 810 } 811 812 if iNdEx > l { 813 return io.ErrUnexpectedEOF 814 } 815 return nil 816 } 817 func (m *Cat) Unmarshal(dAtA []byte) error { 818 l := len(dAtA) 819 iNdEx := 0 820 for iNdEx < l { 821 preIndex := iNdEx 822 var wire uint64 823 for shift := uint(0); ; shift += 7 { 824 if shift >= 64 { 825 return ErrIntOverflowTestdata 826 } 827 if iNdEx >= l { 828 return io.ErrUnexpectedEOF 829 } 830 b := dAtA[iNdEx] 831 iNdEx++ 832 wire |= uint64(b&0x7F) << shift 833 if b < 0x80 { 834 break 835 } 836 } 837 fieldNum := int32(wire >> 3) 838 wireType := int(wire & 0x7) 839 if wireType == 4 { 840 return fmt.Errorf("proto: Cat: wiretype end group for non-group") 841 } 842 if fieldNum <= 0 { 843 return fmt.Errorf("proto: Cat: illegal tag %d (wire type %d)", fieldNum, wire) 844 } 845 switch fieldNum { 846 case 1: 847 if wireType != 2 { 848 return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) 849 } 850 var stringLen uint64 851 for shift := uint(0); ; shift += 7 { 852 if shift >= 64 { 853 return ErrIntOverflowTestdata 854 } 855 if iNdEx >= l { 856 return io.ErrUnexpectedEOF 857 } 858 b := dAtA[iNdEx] 859 iNdEx++ 860 stringLen |= uint64(b&0x7F) << shift 861 if b < 0x80 { 862 break 863 } 864 } 865 intStringLen := int(stringLen) 866 if intStringLen < 0 { 867 return ErrInvalidLengthTestdata 868 } 869 postIndex := iNdEx + intStringLen 870 if postIndex < 0 { 871 return ErrInvalidLengthTestdata 872 } 873 if postIndex > l { 874 return io.ErrUnexpectedEOF 875 } 876 m.Moniker = string(dAtA[iNdEx:postIndex]) 877 iNdEx = postIndex 878 case 2: 879 if wireType != 0 { 880 return fmt.Errorf("proto: wrong wireType = %d for field Lives", wireType) 881 } 882 m.Lives = 0 883 for shift := uint(0); ; shift += 7 { 884 if shift >= 64 { 885 return ErrIntOverflowTestdata 886 } 887 if iNdEx >= l { 888 return io.ErrUnexpectedEOF 889 } 890 b := dAtA[iNdEx] 891 iNdEx++ 892 m.Lives |= int32(b&0x7F) << shift 893 if b < 0x80 { 894 break 895 } 896 } 897 default: 898 iNdEx = preIndex 899 skippy, err := skipTestdata(dAtA[iNdEx:]) 900 if err != nil { 901 return err 902 } 903 if (skippy < 0) || (iNdEx+skippy) < 0 { 904 return ErrInvalidLengthTestdata 905 } 906 if (iNdEx + skippy) > l { 907 return io.ErrUnexpectedEOF 908 } 909 iNdEx += skippy 910 } 911 } 912 913 if iNdEx > l { 914 return io.ErrUnexpectedEOF 915 } 916 return nil 917 } 918 func (m *HasAnimal) Unmarshal(dAtA []byte) error { 919 l := len(dAtA) 920 iNdEx := 0 921 for iNdEx < l { 922 preIndex := iNdEx 923 var wire uint64 924 for shift := uint(0); ; shift += 7 { 925 if shift >= 64 { 926 return ErrIntOverflowTestdata 927 } 928 if iNdEx >= l { 929 return io.ErrUnexpectedEOF 930 } 931 b := dAtA[iNdEx] 932 iNdEx++ 933 wire |= uint64(b&0x7F) << shift 934 if b < 0x80 { 935 break 936 } 937 } 938 fieldNum := int32(wire >> 3) 939 wireType := int(wire & 0x7) 940 if wireType == 4 { 941 return fmt.Errorf("proto: HasAnimal: wiretype end group for non-group") 942 } 943 if fieldNum <= 0 { 944 return fmt.Errorf("proto: HasAnimal: illegal tag %d (wire type %d)", fieldNum, wire) 945 } 946 switch fieldNum { 947 case 1: 948 if wireType != 2 { 949 return fmt.Errorf("proto: wrong wireType = %d for field Animal", wireType) 950 } 951 var msglen int 952 for shift := uint(0); ; shift += 7 { 953 if shift >= 64 { 954 return ErrIntOverflowTestdata 955 } 956 if iNdEx >= l { 957 return io.ErrUnexpectedEOF 958 } 959 b := dAtA[iNdEx] 960 iNdEx++ 961 msglen |= int(b&0x7F) << shift 962 if b < 0x80 { 963 break 964 } 965 } 966 if msglen < 0 { 967 return ErrInvalidLengthTestdata 968 } 969 postIndex := iNdEx + msglen 970 if postIndex < 0 { 971 return ErrInvalidLengthTestdata 972 } 973 if postIndex > l { 974 return io.ErrUnexpectedEOF 975 } 976 if m.Animal == nil { 977 m.Animal = &types.Any{} 978 } 979 if err := m.Animal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 980 return err 981 } 982 iNdEx = postIndex 983 case 2: 984 if wireType != 0 { 985 return fmt.Errorf("proto: wrong wireType = %d for field X", wireType) 986 } 987 m.X = 0 988 for shift := uint(0); ; shift += 7 { 989 if shift >= 64 { 990 return ErrIntOverflowTestdata 991 } 992 if iNdEx >= l { 993 return io.ErrUnexpectedEOF 994 } 995 b := dAtA[iNdEx] 996 iNdEx++ 997 m.X |= int64(b&0x7F) << shift 998 if b < 0x80 { 999 break 1000 } 1001 } 1002 default: 1003 iNdEx = preIndex 1004 skippy, err := skipTestdata(dAtA[iNdEx:]) 1005 if err != nil { 1006 return err 1007 } 1008 if (skippy < 0) || (iNdEx+skippy) < 0 { 1009 return ErrInvalidLengthTestdata 1010 } 1011 if (iNdEx + skippy) > l { 1012 return io.ErrUnexpectedEOF 1013 } 1014 iNdEx += skippy 1015 } 1016 } 1017 1018 if iNdEx > l { 1019 return io.ErrUnexpectedEOF 1020 } 1021 return nil 1022 } 1023 func (m *HasHasAnimal) Unmarshal(dAtA []byte) error { 1024 l := len(dAtA) 1025 iNdEx := 0 1026 for iNdEx < l { 1027 preIndex := iNdEx 1028 var wire uint64 1029 for shift := uint(0); ; shift += 7 { 1030 if shift >= 64 { 1031 return ErrIntOverflowTestdata 1032 } 1033 if iNdEx >= l { 1034 return io.ErrUnexpectedEOF 1035 } 1036 b := dAtA[iNdEx] 1037 iNdEx++ 1038 wire |= uint64(b&0x7F) << shift 1039 if b < 0x80 { 1040 break 1041 } 1042 } 1043 fieldNum := int32(wire >> 3) 1044 wireType := int(wire & 0x7) 1045 if wireType == 4 { 1046 return fmt.Errorf("proto: HasHasAnimal: wiretype end group for non-group") 1047 } 1048 if fieldNum <= 0 { 1049 return fmt.Errorf("proto: HasHasAnimal: illegal tag %d (wire type %d)", fieldNum, wire) 1050 } 1051 switch fieldNum { 1052 case 1: 1053 if wireType != 2 { 1054 return fmt.Errorf("proto: wrong wireType = %d for field HasAnimal", wireType) 1055 } 1056 var msglen int 1057 for shift := uint(0); ; shift += 7 { 1058 if shift >= 64 { 1059 return ErrIntOverflowTestdata 1060 } 1061 if iNdEx >= l { 1062 return io.ErrUnexpectedEOF 1063 } 1064 b := dAtA[iNdEx] 1065 iNdEx++ 1066 msglen |= int(b&0x7F) << shift 1067 if b < 0x80 { 1068 break 1069 } 1070 } 1071 if msglen < 0 { 1072 return ErrInvalidLengthTestdata 1073 } 1074 postIndex := iNdEx + msglen 1075 if postIndex < 0 { 1076 return ErrInvalidLengthTestdata 1077 } 1078 if postIndex > l { 1079 return io.ErrUnexpectedEOF 1080 } 1081 if m.HasAnimal == nil { 1082 m.HasAnimal = &types.Any{} 1083 } 1084 if err := m.HasAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1085 return err 1086 } 1087 iNdEx = postIndex 1088 default: 1089 iNdEx = preIndex 1090 skippy, err := skipTestdata(dAtA[iNdEx:]) 1091 if err != nil { 1092 return err 1093 } 1094 if (skippy < 0) || (iNdEx+skippy) < 0 { 1095 return ErrInvalidLengthTestdata 1096 } 1097 if (iNdEx + skippy) > l { 1098 return io.ErrUnexpectedEOF 1099 } 1100 iNdEx += skippy 1101 } 1102 } 1103 1104 if iNdEx > l { 1105 return io.ErrUnexpectedEOF 1106 } 1107 return nil 1108 } 1109 func (m *HasHasHasAnimal) Unmarshal(dAtA []byte) error { 1110 l := len(dAtA) 1111 iNdEx := 0 1112 for iNdEx < l { 1113 preIndex := iNdEx 1114 var wire uint64 1115 for shift := uint(0); ; shift += 7 { 1116 if shift >= 64 { 1117 return ErrIntOverflowTestdata 1118 } 1119 if iNdEx >= l { 1120 return io.ErrUnexpectedEOF 1121 } 1122 b := dAtA[iNdEx] 1123 iNdEx++ 1124 wire |= uint64(b&0x7F) << shift 1125 if b < 0x80 { 1126 break 1127 } 1128 } 1129 fieldNum := int32(wire >> 3) 1130 wireType := int(wire & 0x7) 1131 if wireType == 4 { 1132 return fmt.Errorf("proto: HasHasHasAnimal: wiretype end group for non-group") 1133 } 1134 if fieldNum <= 0 { 1135 return fmt.Errorf("proto: HasHasHasAnimal: illegal tag %d (wire type %d)", fieldNum, wire) 1136 } 1137 switch fieldNum { 1138 case 1: 1139 if wireType != 2 { 1140 return fmt.Errorf("proto: wrong wireType = %d for field HasHasAnimal", wireType) 1141 } 1142 var msglen int 1143 for shift := uint(0); ; shift += 7 { 1144 if shift >= 64 { 1145 return ErrIntOverflowTestdata 1146 } 1147 if iNdEx >= l { 1148 return io.ErrUnexpectedEOF 1149 } 1150 b := dAtA[iNdEx] 1151 iNdEx++ 1152 msglen |= int(b&0x7F) << shift 1153 if b < 0x80 { 1154 break 1155 } 1156 } 1157 if msglen < 0 { 1158 return ErrInvalidLengthTestdata 1159 } 1160 postIndex := iNdEx + msglen 1161 if postIndex < 0 { 1162 return ErrInvalidLengthTestdata 1163 } 1164 if postIndex > l { 1165 return io.ErrUnexpectedEOF 1166 } 1167 if m.HasHasAnimal == nil { 1168 m.HasHasAnimal = &types.Any{} 1169 } 1170 if err := m.HasHasAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1171 return err 1172 } 1173 iNdEx = postIndex 1174 default: 1175 iNdEx = preIndex 1176 skippy, err := skipTestdata(dAtA[iNdEx:]) 1177 if err != nil { 1178 return err 1179 } 1180 if (skippy < 0) || (iNdEx+skippy) < 0 { 1181 return ErrInvalidLengthTestdata 1182 } 1183 if (iNdEx + skippy) > l { 1184 return io.ErrUnexpectedEOF 1185 } 1186 iNdEx += skippy 1187 } 1188 } 1189 1190 if iNdEx > l { 1191 return io.ErrUnexpectedEOF 1192 } 1193 return nil 1194 } 1195 func (m *BadMultiSignature) Unmarshal(dAtA []byte) error { 1196 l := len(dAtA) 1197 iNdEx := 0 1198 for iNdEx < l { 1199 preIndex := iNdEx 1200 var wire uint64 1201 for shift := uint(0); ; shift += 7 { 1202 if shift >= 64 { 1203 return ErrIntOverflowTestdata 1204 } 1205 if iNdEx >= l { 1206 return io.ErrUnexpectedEOF 1207 } 1208 b := dAtA[iNdEx] 1209 iNdEx++ 1210 wire |= uint64(b&0x7F) << shift 1211 if b < 0x80 { 1212 break 1213 } 1214 } 1215 fieldNum := int32(wire >> 3) 1216 wireType := int(wire & 0x7) 1217 if wireType == 4 { 1218 return fmt.Errorf("proto: BadMultiSignature: wiretype end group for non-group") 1219 } 1220 if fieldNum <= 0 { 1221 return fmt.Errorf("proto: BadMultiSignature: illegal tag %d (wire type %d)", fieldNum, wire) 1222 } 1223 switch fieldNum { 1224 case 1: 1225 if wireType != 2 { 1226 return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) 1227 } 1228 var byteLen int 1229 for shift := uint(0); ; shift += 7 { 1230 if shift >= 64 { 1231 return ErrIntOverflowTestdata 1232 } 1233 if iNdEx >= l { 1234 return io.ErrUnexpectedEOF 1235 } 1236 b := dAtA[iNdEx] 1237 iNdEx++ 1238 byteLen |= int(b&0x7F) << shift 1239 if b < 0x80 { 1240 break 1241 } 1242 } 1243 if byteLen < 0 { 1244 return ErrInvalidLengthTestdata 1245 } 1246 postIndex := iNdEx + byteLen 1247 if postIndex < 0 { 1248 return ErrInvalidLengthTestdata 1249 } 1250 if postIndex > l { 1251 return io.ErrUnexpectedEOF 1252 } 1253 m.Signatures = append(m.Signatures, make([]byte, postIndex-iNdEx)) 1254 copy(m.Signatures[len(m.Signatures)-1], dAtA[iNdEx:postIndex]) 1255 iNdEx = postIndex 1256 case 5: 1257 if wireType != 2 { 1258 return fmt.Errorf("proto: wrong wireType = %d for field MaliciousField", wireType) 1259 } 1260 var byteLen int 1261 for shift := uint(0); ; shift += 7 { 1262 if shift >= 64 { 1263 return ErrIntOverflowTestdata 1264 } 1265 if iNdEx >= l { 1266 return io.ErrUnexpectedEOF 1267 } 1268 b := dAtA[iNdEx] 1269 iNdEx++ 1270 byteLen |= int(b&0x7F) << shift 1271 if b < 0x80 { 1272 break 1273 } 1274 } 1275 if byteLen < 0 { 1276 return ErrInvalidLengthTestdata 1277 } 1278 postIndex := iNdEx + byteLen 1279 if postIndex < 0 { 1280 return ErrInvalidLengthTestdata 1281 } 1282 if postIndex > l { 1283 return io.ErrUnexpectedEOF 1284 } 1285 m.MaliciousField = append(m.MaliciousField[:0], dAtA[iNdEx:postIndex]...) 1286 if m.MaliciousField == nil { 1287 m.MaliciousField = []byte{} 1288 } 1289 iNdEx = postIndex 1290 default: 1291 iNdEx = preIndex 1292 skippy, err := skipTestdata(dAtA[iNdEx:]) 1293 if err != nil { 1294 return err 1295 } 1296 if (skippy < 0) || (iNdEx+skippy) < 0 { 1297 return ErrInvalidLengthTestdata 1298 } 1299 if (iNdEx + skippy) > l { 1300 return io.ErrUnexpectedEOF 1301 } 1302 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1303 iNdEx += skippy 1304 } 1305 } 1306 1307 if iNdEx > l { 1308 return io.ErrUnexpectedEOF 1309 } 1310 return nil 1311 } 1312 func skipTestdata(dAtA []byte) (n int, err error) { 1313 l := len(dAtA) 1314 iNdEx := 0 1315 depth := 0 1316 for iNdEx < l { 1317 var wire uint64 1318 for shift := uint(0); ; shift += 7 { 1319 if shift >= 64 { 1320 return 0, ErrIntOverflowTestdata 1321 } 1322 if iNdEx >= l { 1323 return 0, io.ErrUnexpectedEOF 1324 } 1325 b := dAtA[iNdEx] 1326 iNdEx++ 1327 wire |= (uint64(b) & 0x7F) << shift 1328 if b < 0x80 { 1329 break 1330 } 1331 } 1332 wireType := int(wire & 0x7) 1333 switch wireType { 1334 case 0: 1335 for shift := uint(0); ; shift += 7 { 1336 if shift >= 64 { 1337 return 0, ErrIntOverflowTestdata 1338 } 1339 if iNdEx >= l { 1340 return 0, io.ErrUnexpectedEOF 1341 } 1342 iNdEx++ 1343 if dAtA[iNdEx-1] < 0x80 { 1344 break 1345 } 1346 } 1347 case 1: 1348 iNdEx += 8 1349 case 2: 1350 var length int 1351 for shift := uint(0); ; shift += 7 { 1352 if shift >= 64 { 1353 return 0, ErrIntOverflowTestdata 1354 } 1355 if iNdEx >= l { 1356 return 0, io.ErrUnexpectedEOF 1357 } 1358 b := dAtA[iNdEx] 1359 iNdEx++ 1360 length |= (int(b) & 0x7F) << shift 1361 if b < 0x80 { 1362 break 1363 } 1364 } 1365 if length < 0 { 1366 return 0, ErrInvalidLengthTestdata 1367 } 1368 iNdEx += length 1369 case 3: 1370 depth++ 1371 case 4: 1372 if depth == 0 { 1373 return 0, ErrUnexpectedEndOfGroupTestdata 1374 } 1375 depth-- 1376 case 5: 1377 iNdEx += 4 1378 default: 1379 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1380 } 1381 if iNdEx < 0 { 1382 return 0, ErrInvalidLengthTestdata 1383 } 1384 if depth == 0 { 1385 return iNdEx, nil 1386 } 1387 } 1388 return 0, io.ErrUnexpectedEOF 1389 } 1390 1391 var ( 1392 ErrInvalidLengthTestdata = fmt.Errorf("proto: negative length found during unmarshaling") 1393 ErrIntOverflowTestdata = fmt.Errorf("proto: integer overflow") 1394 ErrUnexpectedEndOfGroupTestdata = fmt.Errorf("proto: unexpected end of group") 1395 )