MCPcopy Index your code
hub / github.com/cockroachdb/errors / Unmarshal

Method Unmarshal

errorspb/errors.pb.go:1801–1882  ·  view source on GitHub ↗
(dAtA []byte)

Source from the content-addressed store, hash-verified

1799 return nil
1800}
1801func (m *StringsPayload) Unmarshal(dAtA []byte) error {
1802 l := len(dAtA)
1803 iNdEx := 0
1804 for iNdEx < l {
1805 preIndex := iNdEx
1806 var wire uint64
1807 for shift := uint(0); ; shift += 7 {
1808 if shift >= 64 {
1809 return ErrIntOverflowErrors
1810 }
1811 if iNdEx >= l {
1812 return io.ErrUnexpectedEOF
1813 }
1814 b := dAtA[iNdEx]
1815 iNdEx++
1816 wire |= uint64(b&0x7F) << shift
1817 if b < 0x80 {
1818 break
1819 }
1820 }
1821 fieldNum := int32(wire >> 3)
1822 wireType := int(wire & 0x7)
1823 if wireType == 4 {
1824 return fmt.Errorf("proto: StringsPayload: wiretype end group for non-group")
1825 }
1826 if fieldNum <= 0 {
1827 return fmt.Errorf("proto: StringsPayload: illegal tag %d (wire type %d)", fieldNum, wire)
1828 }
1829 switch fieldNum {
1830 case 1:
1831 if wireType != 2 {
1832 return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType)
1833 }
1834 var stringLen uint64
1835 for shift := uint(0); ; shift += 7 {
1836 if shift >= 64 {
1837 return ErrIntOverflowErrors
1838 }
1839 if iNdEx >= l {
1840 return io.ErrUnexpectedEOF
1841 }
1842 b := dAtA[iNdEx]
1843 iNdEx++
1844 stringLen |= uint64(b&0x7F) << shift
1845 if b < 0x80 {
1846 break
1847 }
1848 }
1849 intStringLen := int(stringLen)
1850 if intStringLen < 0 {
1851 return ErrInvalidLengthErrors
1852 }
1853 postIndex := iNdEx + intStringLen
1854 if postIndex < 0 {
1855 return ErrInvalidLengthErrors
1856 }
1857 if postIndex > l {
1858 return io.ErrUnexpectedEOF

Callers 1

XXX_UnmarshalMethod · 0.95

Calls 1

skipErrorsFunction · 0.85

Tested by

no test coverage detected