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

Method Unmarshal

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

Source from the content-addressed store, hash-verified

19747 return nil
19748}
19749func (m *Function) Unmarshal(dAtA []byte) error {
19750 l := len(dAtA)
19751 iNdEx := 0
19752 for iNdEx < l {
19753 preIndex := iNdEx
19754 var wire uint64
19755 for shift := uint(0); ; shift += 7 {
19756 if shift >= 64 {
19757 return ErrIntOverflowPb
19758 }
19759 if iNdEx >= l {
19760 return io.ErrUnexpectedEOF
19761 }
19762 b := dAtA[iNdEx]
19763 iNdEx++
19764 wire |= uint64(b&0x7F) << shift
19765 if b < 0x80 {
19766 break
19767 }
19768 }
19769 fieldNum := int32(wire >> 3)
19770 wireType := int(wire & 0x7)
19771 if wireType == 4 {
19772 return fmt.Errorf("proto: Function: wiretype end group for non-group")
19773 }
19774 if fieldNum <= 0 {
19775 return fmt.Errorf("proto: Function: illegal tag %d (wire type %d)", fieldNum, wire)
19776 }
19777 switch fieldNum {
19778 case 1:
19779 if wireType != 2 {
19780 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
19781 }
19782 var stringLen uint64
19783 for shift := uint(0); ; shift += 7 {
19784 if shift >= 64 {
19785 return ErrIntOverflowPb
19786 }
19787 if iNdEx >= l {
19788 return io.ErrUnexpectedEOF
19789 }
19790 b := dAtA[iNdEx]
19791 iNdEx++
19792 stringLen |= uint64(b&0x7F) << shift
19793 if b < 0x80 {
19794 break
19795 }
19796 }
19797 intStringLen := int(stringLen)
19798 if intStringLen < 0 {
19799 return ErrInvalidLengthPb
19800 }
19801 postIndex := iNdEx + intStringLen
19802 if postIndex < 0 {
19803 return ErrInvalidLengthPb
19804 }
19805 if postIndex > l {
19806 return io.ErrUnexpectedEOF

Callers 1

XXX_UnmarshalMethod · 0.95

Calls 1

skipPbFunction · 0.85

Tested by

no test coverage detected