| 2384 | return nil |
| 2385 | } |
| 2386 | func (m *FuncNodePb) Unmarshal(data []byte) error { |
| 2387 | var hasFields [1]uint64 |
| 2388 | l := len(data) |
| 2389 | iNdEx := 0 |
| 2390 | for iNdEx < l { |
| 2391 | preIndex := iNdEx |
| 2392 | var wire uint64 |
| 2393 | for shift := uint(0); ; shift += 7 { |
| 2394 | if shift >= 64 { |
| 2395 | return ErrIntOverflowNode |
| 2396 | } |
| 2397 | if iNdEx >= l { |
| 2398 | return io.ErrUnexpectedEOF |
| 2399 | } |
| 2400 | b := data[iNdEx] |
| 2401 | iNdEx++ |
| 2402 | wire |= (uint64(b) & 0x7F) << shift |
| 2403 | if b < 0x80 { |
| 2404 | break |
| 2405 | } |
| 2406 | } |
| 2407 | fieldNum := int32(wire >> 3) |
| 2408 | wireType := int(wire & 0x7) |
| 2409 | if wireType == 4 { |
| 2410 | return fmt.Errorf("proto: FuncNodePb: wiretype end group for non-group") |
| 2411 | } |
| 2412 | if fieldNum <= 0 { |
| 2413 | return fmt.Errorf("proto: FuncNodePb: illegal tag %d (wire type %d)", fieldNum, wire) |
| 2414 | } |
| 2415 | switch fieldNum { |
| 2416 | case 1: |
| 2417 | if wireType != 2 { |
| 2418 | return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) |
| 2419 | } |
| 2420 | var stringLen uint64 |
| 2421 | for shift := uint(0); ; shift += 7 { |
| 2422 | if shift >= 64 { |
| 2423 | return ErrIntOverflowNode |
| 2424 | } |
| 2425 | if iNdEx >= l { |
| 2426 | return io.ErrUnexpectedEOF |
| 2427 | } |
| 2428 | b := data[iNdEx] |
| 2429 | iNdEx++ |
| 2430 | stringLen |= (uint64(b) & 0x7F) << shift |
| 2431 | if b < 0x80 { |
| 2432 | break |
| 2433 | } |
| 2434 | } |
| 2435 | intStringLen := int(stringLen) |
| 2436 | if intStringLen < 0 { |
| 2437 | return ErrInvalidLengthNode |
| 2438 | } |
| 2439 | postIndex := iNdEx + intStringLen |
| 2440 | if postIndex > l { |
| 2441 | return io.ErrUnexpectedEOF |
| 2442 | } |
| 2443 | m.Name = string(data[iNdEx:postIndex]) |