| 747 | return nil |
| 748 | } |
| 749 | func skipKv(dAtA []byte) (n int, err error) { |
| 750 | l := len(dAtA) |
| 751 | iNdEx := 0 |
| 752 | for iNdEx < l { |
| 753 | var wire uint64 |
| 754 | for shift := uint(0); ; shift += 7 { |
| 755 | if shift >= 64 { |
| 756 | return 0, ErrIntOverflowKv |
| 757 | } |
| 758 | if iNdEx >= l { |
| 759 | return 0, io.ErrUnexpectedEOF |
| 760 | } |
| 761 | b := dAtA[iNdEx] |
| 762 | iNdEx++ |
| 763 | wire |= (uint64(b) & 0x7F) << shift |
| 764 | if b < 0x80 { |
| 765 | break |
| 766 | } |
| 767 | } |
| 768 | wireType := int(wire & 0x7) |
| 769 | switch wireType { |
| 770 | case 0: |
| 771 | for shift := uint(0); ; shift += 7 { |
| 772 | if shift >= 64 { |
| 773 | return 0, ErrIntOverflowKv |
| 774 | } |
| 775 | if iNdEx >= l { |
| 776 | return 0, io.ErrUnexpectedEOF |
| 777 | } |
| 778 | iNdEx++ |
| 779 | if dAtA[iNdEx-1] < 0x80 { |
| 780 | break |
| 781 | } |
| 782 | } |
| 783 | return iNdEx, nil |
| 784 | case 1: |
| 785 | iNdEx += 8 |
| 786 | return iNdEx, nil |
| 787 | case 2: |
| 788 | var length int |
| 789 | for shift := uint(0); ; shift += 7 { |
| 790 | if shift >= 64 { |
| 791 | return 0, ErrIntOverflowKv |
| 792 | } |
| 793 | if iNdEx >= l { |
| 794 | return 0, io.ErrUnexpectedEOF |
| 795 | } |
| 796 | b := dAtA[iNdEx] |
| 797 | iNdEx++ |
| 798 | length |= (int(b) & 0x7F) << shift |
| 799 | if b < 0x80 { |
| 800 | break |
| 801 | } |
| 802 | } |
| 803 | if length < 0 { |
| 804 | return 0, ErrInvalidLengthKv |
| 805 | } |
| 806 | iNdEx += length |