(dAtA []byte)
| 470 | return fmt.Sprintf("*%v", pv) |
| 471 | } |
| 472 | func (m *KeyValueStore) Unmarshal(dAtA []byte) error { |
| 473 | l := len(dAtA) |
| 474 | iNdEx := 0 |
| 475 | for iNdEx < l { |
| 476 | preIndex := iNdEx |
| 477 | var wire uint64 |
| 478 | for shift := uint(0); ; shift += 7 { |
| 479 | if shift >= 64 { |
| 480 | return ErrIntOverflowKv |
| 481 | } |
| 482 | if iNdEx >= l { |
| 483 | return io.ErrUnexpectedEOF |
| 484 | } |
| 485 | b := dAtA[iNdEx] |
| 486 | iNdEx++ |
| 487 | wire |= uint64(b&0x7F) << shift |
| 488 | if b < 0x80 { |
| 489 | break |
| 490 | } |
| 491 | } |
| 492 | fieldNum := int32(wire >> 3) |
| 493 | wireType := int(wire & 0x7) |
| 494 | if wireType == 4 { |
| 495 | return fmt.Errorf("proto: KeyValueStore: wiretype end group for non-group") |
| 496 | } |
| 497 | if fieldNum <= 0 { |
| 498 | return fmt.Errorf("proto: KeyValueStore: illegal tag %d (wire type %d)", fieldNum, wire) |
| 499 | } |
| 500 | switch fieldNum { |
| 501 | case 1: |
| 502 | if wireType != 2 { |
| 503 | return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType) |
| 504 | } |
| 505 | var msglen int |
| 506 | for shift := uint(0); ; shift += 7 { |
| 507 | if shift >= 64 { |
| 508 | return ErrIntOverflowKv |
| 509 | } |
| 510 | if iNdEx >= l { |
| 511 | return io.ErrUnexpectedEOF |
| 512 | } |
| 513 | b := dAtA[iNdEx] |
| 514 | iNdEx++ |
| 515 | msglen |= int(b&0x7F) << shift |
| 516 | if b < 0x80 { |
| 517 | break |
| 518 | } |
| 519 | } |
| 520 | if msglen < 0 { |
| 521 | return ErrInvalidLengthKv |
| 522 | } |
| 523 | postIndex := iNdEx + msglen |
| 524 | if postIndex < 0 { |
| 525 | return ErrInvalidLengthKv |
| 526 | } |
| 527 | if postIndex > l { |
| 528 | return io.ErrUnexpectedEOF |
| 529 | } |
no test coverage detected