MCPcopy
hub / github.com/grafana/tempo / Unmarshal

Method Unmarshal

pkg/tempopb/tempo.pb.go:12024–12107  ·  view source on GitHub ↗
(dAtA []byte)

Source from the content-addressed store, hash-verified

12022 return nil
12023}
12024func (m *LinkSlice) Unmarshal(dAtA []byte) error {
12025 l := len(dAtA)
12026 iNdEx := 0
12027 for iNdEx < l {
12028 preIndex := iNdEx
12029 var wire uint64
12030 for shift := uint(0); ; shift += 7 {
12031 if shift >= 64 {
12032 return ErrIntOverflowTempo
12033 }
12034 if iNdEx >= l {
12035 return io.ErrUnexpectedEOF
12036 }
12037 b := dAtA[iNdEx]
12038 iNdEx++
12039 wire |= uint64(b&0x7F) << shift
12040 if b < 0x80 {
12041 break
12042 }
12043 }
12044 fieldNum := int32(wire >> 3)
12045 wireType := int(wire & 0x7)
12046 if wireType == 4 {
12047 return fmt.Errorf("proto: LinkSlice: wiretype end group for non-group")
12048 }
12049 if fieldNum <= 0 {
12050 return fmt.Errorf("proto: LinkSlice: illegal tag %d (wire type %d)", fieldNum, wire)
12051 }
12052 switch fieldNum {
12053 case 1:
12054 if wireType != 2 {
12055 return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType)
12056 }
12057 var msglen int
12058 for shift := uint(0); ; shift += 7 {
12059 if shift >= 64 {
12060 return ErrIntOverflowTempo
12061 }
12062 if iNdEx >= l {
12063 return io.ErrUnexpectedEOF
12064 }
12065 b := dAtA[iNdEx]
12066 iNdEx++
12067 msglen |= int(b&0x7F) << shift
12068 if b < 0x80 {
12069 break
12070 }
12071 }
12072 if msglen < 0 {
12073 return ErrInvalidLengthTempo
12074 }
12075 postIndex := iNdEx + msglen
12076 if postIndex < 0 {
12077 return ErrInvalidLengthTempo
12078 }
12079 if postIndex > l {
12080 return io.ErrUnexpectedEOF
12081 }

Callers 2

XXX_UnmarshalMethod · 0.95

Calls 2

skipTempoFunction · 0.85
UnmarshalMethod · 0.65

Tested by

no test coverage detected