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

Method Unmarshal

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

Source from the content-addressed store, hash-verified

1685 return nil
1686}
1687func (m *ErrorTypeMark) Unmarshal(dAtA []byte) error {
1688 l := len(dAtA)
1689 iNdEx := 0
1690 for iNdEx < l {
1691 preIndex := iNdEx
1692 var wire uint64
1693 for shift := uint(0); ; shift += 7 {
1694 if shift >= 64 {
1695 return ErrIntOverflowErrors
1696 }
1697 if iNdEx >= l {
1698 return io.ErrUnexpectedEOF
1699 }
1700 b := dAtA[iNdEx]
1701 iNdEx++
1702 wire |= uint64(b&0x7F) << shift
1703 if b < 0x80 {
1704 break
1705 }
1706 }
1707 fieldNum := int32(wire >> 3)
1708 wireType := int(wire & 0x7)
1709 if wireType == 4 {
1710 return fmt.Errorf("proto: ErrorTypeMark: wiretype end group for non-group")
1711 }
1712 if fieldNum <= 0 {
1713 return fmt.Errorf("proto: ErrorTypeMark: illegal tag %d (wire type %d)", fieldNum, wire)
1714 }
1715 switch fieldNum {
1716 case 1:
1717 if wireType != 2 {
1718 return fmt.Errorf("proto: wrong wireType = %d for field FamilyName", wireType)
1719 }
1720 var stringLen uint64
1721 for shift := uint(0); ; shift += 7 {
1722 if shift >= 64 {
1723 return ErrIntOverflowErrors
1724 }
1725 if iNdEx >= l {
1726 return io.ErrUnexpectedEOF
1727 }
1728 b := dAtA[iNdEx]
1729 iNdEx++
1730 stringLen |= uint64(b&0x7F) << shift
1731 if b < 0x80 {
1732 break
1733 }
1734 }
1735 intStringLen := int(stringLen)
1736 if intStringLen < 0 {
1737 return ErrInvalidLengthErrors
1738 }
1739 postIndex := iNdEx + intStringLen
1740 if postIndex < 0 {
1741 return ErrInvalidLengthErrors
1742 }
1743 if postIndex > l {
1744 return io.ErrUnexpectedEOF

Callers 1

XXX_UnmarshalMethod · 0.95

Calls 1

skipErrorsFunction · 0.85

Tested by

no test coverage detected