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

Method Unmarshal

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

Source from the content-addressed store, hash-verified

9198 return nil
9199}
9200func (m *Span) Unmarshal(dAtA []byte) error {
9201 l := len(dAtA)
9202 iNdEx := 0
9203 for iNdEx < l {
9204 preIndex := iNdEx
9205 var wire uint64
9206 for shift := uint(0); ; shift += 7 {
9207 if shift >= 64 {
9208 return ErrIntOverflowTempo
9209 }
9210 if iNdEx >= l {
9211 return io.ErrUnexpectedEOF
9212 }
9213 b := dAtA[iNdEx]
9214 iNdEx++
9215 wire |= uint64(b&0x7F) << shift
9216 if b < 0x80 {
9217 break
9218 }
9219 }
9220 fieldNum := int32(wire >> 3)
9221 wireType := int(wire & 0x7)
9222 if wireType == 4 {
9223 return fmt.Errorf("proto: Span: wiretype end group for non-group")
9224 }
9225 if fieldNum <= 0 {
9226 return fmt.Errorf("proto: Span: illegal tag %d (wire type %d)", fieldNum, wire)
9227 }
9228 switch fieldNum {
9229 case 1:
9230 if wireType != 2 {
9231 return fmt.Errorf("proto: wrong wireType = %d for field SpanID", wireType)
9232 }
9233 var stringLen uint64
9234 for shift := uint(0); ; shift += 7 {
9235 if shift >= 64 {
9236 return ErrIntOverflowTempo
9237 }
9238 if iNdEx >= l {
9239 return io.ErrUnexpectedEOF
9240 }
9241 b := dAtA[iNdEx]
9242 iNdEx++
9243 stringLen |= uint64(b&0x7F) << shift
9244 if b < 0x80 {
9245 break
9246 }
9247 }
9248 intStringLen := int(stringLen)
9249 if intStringLen < 0 {
9250 return ErrInvalidLengthTempo
9251 }
9252 postIndex := iNdEx + intStringLen
9253 if postIndex < 0 {
9254 return ErrInvalidLengthTempo
9255 }
9256 if postIndex > l {
9257 return io.ErrUnexpectedEOF

Callers 1

XXX_UnmarshalMethod · 0.95

Calls 2

skipTempoFunction · 0.85
UnmarshalMethod · 0.65

Tested by

no test coverage detected