MCPcopy Create free account
hub / github.com/dgraph-io/dgraph-benchmarks / skipPb

Function skipPb

bitmap/pb.pb.go:24301–24378  ·  view source on GitHub ↗
(dAtA []byte)

Source from the content-addressed store, hash-verified

24299 return nil
24300}
24301func skipPb(dAtA []byte) (n int, err error) {
24302 l := len(dAtA)
24303 iNdEx := 0
24304 depth := 0
24305 for iNdEx < l {
24306 var wire uint64
24307 for shift := uint(0); ; shift += 7 {
24308 if shift >= 64 {
24309 return 0, ErrIntOverflowPb
24310 }
24311 if iNdEx >= l {
24312 return 0, io.ErrUnexpectedEOF
24313 }
24314 b := dAtA[iNdEx]
24315 iNdEx++
24316 wire |= (uint64(b) & 0x7F) << shift
24317 if b < 0x80 {
24318 break
24319 }
24320 }
24321 wireType := int(wire & 0x7)
24322 switch wireType {
24323 case 0:
24324 for shift := uint(0); ; shift += 7 {
24325 if shift >= 64 {
24326 return 0, ErrIntOverflowPb
24327 }
24328 if iNdEx >= l {
24329 return 0, io.ErrUnexpectedEOF
24330 }
24331 iNdEx++
24332 if dAtA[iNdEx-1] < 0x80 {
24333 break
24334 }
24335 }
24336 case 1:
24337 iNdEx += 8
24338 case 2:
24339 var length int
24340 for shift := uint(0); ; shift += 7 {
24341 if shift >= 64 {
24342 return 0, ErrIntOverflowPb
24343 }
24344 if iNdEx >= l {
24345 return 0, io.ErrUnexpectedEOF
24346 }
24347 b := dAtA[iNdEx]
24348 iNdEx++
24349 length |= (int(b) & 0x7F) << shift
24350 if b < 0x80 {
24351 break
24352 }
24353 }
24354 if length < 0 {
24355 return 0, ErrInvalidLengthPb
24356 }
24357 iNdEx += length
24358 case 3:

Callers 15

UnmarshalMethod · 0.85
UnmarshalMethod · 0.85
UnmarshalMethod · 0.85
UnmarshalMethod · 0.85
UnmarshalMethod · 0.85
UnmarshalMethod · 0.85
UnmarshalMethod · 0.85
UnmarshalMethod · 0.85
UnmarshalMethod · 0.85
UnmarshalMethod · 0.85
UnmarshalMethod · 0.85
UnmarshalMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected