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

Method Unmarshal

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

Source from the content-addressed store, hash-verified

20210 return nil
20211}
20212func (m *SchemaNode) Unmarshal(dAtA []byte) error {
20213 l := len(dAtA)
20214 iNdEx := 0
20215 for iNdEx < l {
20216 preIndex := iNdEx
20217 var wire uint64
20218 for shift := uint(0); ; shift += 7 {
20219 if shift >= 64 {
20220 return ErrIntOverflowPb
20221 }
20222 if iNdEx >= l {
20223 return io.ErrUnexpectedEOF
20224 }
20225 b := dAtA[iNdEx]
20226 iNdEx++
20227 wire |= uint64(b&0x7F) << shift
20228 if b < 0x80 {
20229 break
20230 }
20231 }
20232 fieldNum := int32(wire >> 3)
20233 wireType := int(wire & 0x7)
20234 if wireType == 4 {
20235 return fmt.Errorf("proto: SchemaNode: wiretype end group for non-group")
20236 }
20237 if fieldNum <= 0 {
20238 return fmt.Errorf("proto: SchemaNode: illegal tag %d (wire type %d)", fieldNum, wire)
20239 }
20240 switch fieldNum {
20241 case 1:
20242 if wireType != 2 {
20243 return fmt.Errorf("proto: wrong wireType = %d for field Predicate", wireType)
20244 }
20245 var stringLen uint64
20246 for shift := uint(0); ; shift += 7 {
20247 if shift >= 64 {
20248 return ErrIntOverflowPb
20249 }
20250 if iNdEx >= l {
20251 return io.ErrUnexpectedEOF
20252 }
20253 b := dAtA[iNdEx]
20254 iNdEx++
20255 stringLen |= uint64(b&0x7F) << shift
20256 if b < 0x80 {
20257 break
20258 }
20259 }
20260 intStringLen := int(stringLen)
20261 if intStringLen < 0 {
20262 return ErrInvalidLengthPb
20263 }
20264 postIndex := iNdEx + intStringLen
20265 if postIndex < 0 {
20266 return ErrInvalidLengthPb
20267 }
20268 if postIndex > l {
20269 return io.ErrUnexpectedEOF

Callers 1

XXX_UnmarshalMethod · 0.95

Calls 1

skipPbFunction · 0.85

Tested by

no test coverage detected