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

Method Unmarshal

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

Source from the content-addressed store, hash-verified

20580 return nil
20581}
20582func (m *SchemaUpdate) Unmarshal(dAtA []byte) error {
20583 l := len(dAtA)
20584 iNdEx := 0
20585 for iNdEx < l {
20586 preIndex := iNdEx
20587 var wire uint64
20588 for shift := uint(0); ; shift += 7 {
20589 if shift >= 64 {
20590 return ErrIntOverflowPb
20591 }
20592 if iNdEx >= l {
20593 return io.ErrUnexpectedEOF
20594 }
20595 b := dAtA[iNdEx]
20596 iNdEx++
20597 wire |= uint64(b&0x7F) << shift
20598 if b < 0x80 {
20599 break
20600 }
20601 }
20602 fieldNum := int32(wire >> 3)
20603 wireType := int(wire & 0x7)
20604 if wireType == 4 {
20605 return fmt.Errorf("proto: SchemaUpdate: wiretype end group for non-group")
20606 }
20607 if fieldNum <= 0 {
20608 return fmt.Errorf("proto: SchemaUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
20609 }
20610 switch fieldNum {
20611 case 1:
20612 if wireType != 2 {
20613 return fmt.Errorf("proto: wrong wireType = %d for field Predicate", wireType)
20614 }
20615 var stringLen uint64
20616 for shift := uint(0); ; shift += 7 {
20617 if shift >= 64 {
20618 return ErrIntOverflowPb
20619 }
20620 if iNdEx >= l {
20621 return io.ErrUnexpectedEOF
20622 }
20623 b := dAtA[iNdEx]
20624 iNdEx++
20625 stringLen |= uint64(b&0x7F) << shift
20626 if b < 0x80 {
20627 break
20628 }
20629 }
20630 intStringLen := int(stringLen)
20631 if intStringLen < 0 {
20632 return ErrInvalidLengthPb
20633 }
20634 postIndex := iNdEx + intStringLen
20635 if postIndex < 0 {
20636 return ErrInvalidLengthPb
20637 }
20638 if postIndex > l {
20639 return io.ErrUnexpectedEOF

Callers 2

XXX_UnmarshalMethod · 0.95
UnmarshalMethod · 0.95

Calls 3

Posting_ValTypeTypeAlias · 0.85
SchemaUpdate_DirectiveTypeAlias · 0.85
skipPbFunction · 0.85

Tested by

no test coverage detected