| 1353 | return nil |
| 1354 | } |
| 1355 | func skipRing(dAtA []byte) (n int, err error) { |
| 1356 | l := len(dAtA) |
| 1357 | iNdEx := 0 |
| 1358 | for iNdEx < l { |
| 1359 | var wire uint64 |
| 1360 | for shift := uint(0); ; shift += 7 { |
| 1361 | if shift >= 64 { |
| 1362 | return 0, ErrIntOverflowRing |
| 1363 | } |
| 1364 | if iNdEx >= l { |
| 1365 | return 0, io.ErrUnexpectedEOF |
| 1366 | } |
| 1367 | b := dAtA[iNdEx] |
| 1368 | iNdEx++ |
| 1369 | wire |= (uint64(b) & 0x7F) << shift |
| 1370 | if b < 0x80 { |
| 1371 | break |
| 1372 | } |
| 1373 | } |
| 1374 | wireType := int(wire & 0x7) |
| 1375 | switch wireType { |
| 1376 | case 0: |
| 1377 | for shift := uint(0); ; shift += 7 { |
| 1378 | if shift >= 64 { |
| 1379 | return 0, ErrIntOverflowRing |
| 1380 | } |
| 1381 | if iNdEx >= l { |
| 1382 | return 0, io.ErrUnexpectedEOF |
| 1383 | } |
| 1384 | iNdEx++ |
| 1385 | if dAtA[iNdEx-1] < 0x80 { |
| 1386 | break |
| 1387 | } |
| 1388 | } |
| 1389 | return iNdEx, nil |
| 1390 | case 1: |
| 1391 | iNdEx += 8 |
| 1392 | return iNdEx, nil |
| 1393 | case 2: |
| 1394 | var length int |
| 1395 | for shift := uint(0); ; shift += 7 { |
| 1396 | if shift >= 64 { |
| 1397 | return 0, ErrIntOverflowRing |
| 1398 | } |
| 1399 | if iNdEx >= l { |
| 1400 | return 0, io.ErrUnexpectedEOF |
| 1401 | } |
| 1402 | b := dAtA[iNdEx] |
| 1403 | iNdEx++ |
| 1404 | length |= (int(b) & 0x7F) << shift |
| 1405 | if b < 0x80 { |
| 1406 | break |
| 1407 | } |
| 1408 | } |
| 1409 | if length < 0 { |
| 1410 | return 0, ErrInvalidLengthRing |
| 1411 | } |
| 1412 | iNdEx += length |