this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

update to cborgen with variable maxlen, change maxlen to 1000000

+353 -344
+77 -77
api/atproto/cbor_gen.go
··· 37 37 } 38 38 39 39 // t.Cid (string) (string) 40 - if len("cid") > cbg.MaxLength { 40 + if uint64(len("cid")) > cbg.MaxLength { 41 41 return xerrors.Errorf("Value in field \"cid\" was too long") 42 42 } 43 43 ··· 48 48 return err 49 49 } 50 50 51 - if len(t.Cid) > cbg.MaxLength { 51 + if uint64(len(t.Cid)) > cbg.MaxLength { 52 52 return xerrors.Errorf("Value in field t.Cid was too long") 53 53 } 54 54 ··· 60 60 } 61 61 62 62 // t.Uri (string) (string) 63 - if len("uri") > cbg.MaxLength { 63 + if uint64(len("uri")) > cbg.MaxLength { 64 64 return xerrors.Errorf("Value in field \"uri\" was too long") 65 65 } 66 66 ··· 71 71 return err 72 72 } 73 73 74 - if len(t.Uri) > cbg.MaxLength { 74 + if uint64(len(t.Uri)) > cbg.MaxLength { 75 75 return xerrors.Errorf("Value in field t.Uri was too long") 76 76 } 77 77 ··· 85 85 // t.LexiconTypeID (string) (string) 86 86 if t.LexiconTypeID != "" { 87 87 88 - if len("$type") > cbg.MaxLength { 88 + if uint64(len("$type")) > cbg.MaxLength { 89 89 return xerrors.Errorf("Value in field \"$type\" was too long") 90 90 } 91 91 ··· 204 204 } 205 205 206 206 // t.Ops ([]*atproto.SyncSubscribeRepos_RepoOp) (slice) 207 - if len("ops") > cbg.MaxLength { 207 + if uint64(len("ops")) > cbg.MaxLength { 208 208 return xerrors.Errorf("Value in field \"ops\" was too long") 209 209 } 210 210 ··· 215 215 return err 216 216 } 217 217 218 - if len(t.Ops) > cbg.MaxLength { 218 + if uint64(len(t.Ops)) > cbg.MaxLength { 219 219 return xerrors.Errorf("Slice value in field t.Ops was too long") 220 220 } 221 221 ··· 230 230 } 231 231 232 232 // t.Rev (string) (string) 233 - if len("rev") > cbg.MaxLength { 233 + if uint64(len("rev")) > cbg.MaxLength { 234 234 return xerrors.Errorf("Value in field \"rev\" was too long") 235 235 } 236 236 ··· 241 241 return err 242 242 } 243 243 244 - if len(t.Rev) > cbg.MaxLength { 244 + if uint64(len(t.Rev)) > cbg.MaxLength { 245 245 return xerrors.Errorf("Value in field t.Rev was too long") 246 246 } 247 247 ··· 253 253 } 254 254 255 255 // t.Seq (int64) (int64) 256 - if len("seq") > cbg.MaxLength { 256 + if uint64(len("seq")) > cbg.MaxLength { 257 257 return xerrors.Errorf("Value in field \"seq\" was too long") 258 258 } 259 259 ··· 275 275 } 276 276 277 277 // t.Prev (util.LexLink) (struct) 278 - if len("prev") > cbg.MaxLength { 278 + if uint64(len("prev")) > cbg.MaxLength { 279 279 return xerrors.Errorf("Value in field \"prev\" was too long") 280 280 } 281 281 ··· 291 291 } 292 292 293 293 // t.Repo (string) (string) 294 - if len("repo") > cbg.MaxLength { 294 + if uint64(len("repo")) > cbg.MaxLength { 295 295 return xerrors.Errorf("Value in field \"repo\" was too long") 296 296 } 297 297 ··· 302 302 return err 303 303 } 304 304 305 - if len(t.Repo) > cbg.MaxLength { 305 + if uint64(len(t.Repo)) > cbg.MaxLength { 306 306 return xerrors.Errorf("Value in field t.Repo was too long") 307 307 } 308 308 ··· 314 314 } 315 315 316 316 // t.Time (string) (string) 317 - if len("time") > cbg.MaxLength { 317 + if uint64(len("time")) > cbg.MaxLength { 318 318 return xerrors.Errorf("Value in field \"time\" was too long") 319 319 } 320 320 ··· 325 325 return err 326 326 } 327 327 328 - if len(t.Time) > cbg.MaxLength { 328 + if uint64(len(t.Time)) > cbg.MaxLength { 329 329 return xerrors.Errorf("Value in field t.Time was too long") 330 330 } 331 331 ··· 337 337 } 338 338 339 339 // t.Blobs ([]util.LexLink) (slice) 340 - if len("blobs") > cbg.MaxLength { 340 + if uint64(len("blobs")) > cbg.MaxLength { 341 341 return xerrors.Errorf("Value in field \"blobs\" was too long") 342 342 } 343 343 ··· 348 348 return err 349 349 } 350 350 351 - if len(t.Blobs) > cbg.MaxLength { 351 + if uint64(len(t.Blobs)) > cbg.MaxLength { 352 352 return xerrors.Errorf("Slice value in field t.Blobs was too long") 353 353 } 354 354 ··· 363 363 } 364 364 365 365 // t.Since (string) (string) 366 - if len("since") > cbg.MaxLength { 366 + if uint64(len("since")) > cbg.MaxLength { 367 367 return xerrors.Errorf("Value in field \"since\" was too long") 368 368 } 369 369 ··· 379 379 return err 380 380 } 381 381 } else { 382 - if len(*t.Since) > cbg.MaxLength { 382 + if uint64(len(*t.Since)) > cbg.MaxLength { 383 383 return xerrors.Errorf("Value in field t.Since was too long") 384 384 } 385 385 ··· 394 394 // t.Blocks (util.LexBytes) (slice) 395 395 if t.Blocks != nil { 396 396 397 - if len("blocks") > cbg.MaxLength { 397 + if uint64(len("blocks")) > cbg.MaxLength { 398 398 return xerrors.Errorf("Value in field \"blocks\" was too long") 399 399 } 400 400 ··· 405 405 return err 406 406 } 407 407 408 - if len(t.Blocks) > cbg.ByteArrayMaxLen { 408 + if uint64(len(t.Blocks)) > cbg.ByteArrayMaxLen { 409 409 return xerrors.Errorf("Byte array in field t.Blocks was too long") 410 410 } 411 411 ··· 413 413 return err 414 414 } 415 415 416 - if _, err := cw.Write(t.Blocks[:]); err != nil { 416 + if _, err := cw.Write(t.Blocks); err != nil { 417 417 return err 418 418 } 419 419 420 420 } 421 421 422 422 // t.Commit (util.LexLink) (struct) 423 - if len("commit") > cbg.MaxLength { 423 + if uint64(len("commit")) > cbg.MaxLength { 424 424 return xerrors.Errorf("Value in field \"commit\" was too long") 425 425 } 426 426 ··· 436 436 } 437 437 438 438 // t.Rebase (bool) (bool) 439 - if len("rebase") > cbg.MaxLength { 439 + if uint64(len("rebase")) > cbg.MaxLength { 440 440 return xerrors.Errorf("Value in field \"rebase\" was too long") 441 441 } 442 442 ··· 452 452 } 453 453 454 454 // t.TooBig (bool) (bool) 455 - if len("tooBig") > cbg.MaxLength { 455 + if uint64(len("tooBig")) > cbg.MaxLength { 456 456 return xerrors.Errorf("Value in field \"tooBig\" was too long") 457 457 } 458 458 ··· 714 714 t.Blocks = make([]uint8, extra) 715 715 } 716 716 717 - if _, err := io.ReadFull(cr, t.Blocks[:]); err != nil { 717 + if _, err := io.ReadFull(cr, t.Blocks); err != nil { 718 718 return err 719 719 } 720 720 ··· 786 786 } 787 787 788 788 // t.Did (string) (string) 789 - if len("did") > cbg.MaxLength { 789 + if uint64(len("did")) > cbg.MaxLength { 790 790 return xerrors.Errorf("Value in field \"did\" was too long") 791 791 } 792 792 ··· 797 797 return err 798 798 } 799 799 800 - if len(t.Did) > cbg.MaxLength { 800 + if uint64(len(t.Did)) > cbg.MaxLength { 801 801 return xerrors.Errorf("Value in field t.Did was too long") 802 802 } 803 803 ··· 809 809 } 810 810 811 811 // t.Seq (int64) (int64) 812 - if len("seq") > cbg.MaxLength { 812 + if uint64(len("seq")) > cbg.MaxLength { 813 813 return xerrors.Errorf("Value in field \"seq\" was too long") 814 814 } 815 815 ··· 831 831 } 832 832 833 833 // t.Time (string) (string) 834 - if len("time") > cbg.MaxLength { 834 + if uint64(len("time")) > cbg.MaxLength { 835 835 return xerrors.Errorf("Value in field \"time\" was too long") 836 836 } 837 837 ··· 842 842 return err 843 843 } 844 844 845 - if len(t.Time) > cbg.MaxLength { 845 + if uint64(len(t.Time)) > cbg.MaxLength { 846 846 return xerrors.Errorf("Value in field t.Time was too long") 847 847 } 848 848 ··· 854 854 } 855 855 856 856 // t.Handle (string) (string) 857 - if len("handle") > cbg.MaxLength { 857 + if uint64(len("handle")) > cbg.MaxLength { 858 858 return xerrors.Errorf("Value in field \"handle\" was too long") 859 859 } 860 860 ··· 865 865 return err 866 866 } 867 867 868 - if len(t.Handle) > cbg.MaxLength { 868 + if uint64(len(t.Handle)) > cbg.MaxLength { 869 869 return xerrors.Errorf("Value in field t.Handle was too long") 870 870 } 871 871 ··· 1002 1002 } 1003 1003 1004 1004 // t.Name (string) (string) 1005 - if len("name") > cbg.MaxLength { 1005 + if uint64(len("name")) > cbg.MaxLength { 1006 1006 return xerrors.Errorf("Value in field \"name\" was too long") 1007 1007 } 1008 1008 ··· 1013 1013 return err 1014 1014 } 1015 1015 1016 - if len(t.Name) > cbg.MaxLength { 1016 + if uint64(len(t.Name)) > cbg.MaxLength { 1017 1017 return xerrors.Errorf("Value in field t.Name was too long") 1018 1018 } 1019 1019 ··· 1027 1027 // t.Message (string) (string) 1028 1028 if t.Message != nil { 1029 1029 1030 - if len("message") > cbg.MaxLength { 1030 + if uint64(len("message")) > cbg.MaxLength { 1031 1031 return xerrors.Errorf("Value in field \"message\" was too long") 1032 1032 } 1033 1033 ··· 1043 1043 return err 1044 1044 } 1045 1045 } else { 1046 - if len(*t.Message) > cbg.MaxLength { 1046 + if uint64(len(*t.Message)) > cbg.MaxLength { 1047 1047 return xerrors.Errorf("Value in field t.Message was too long") 1048 1048 } 1049 1049 ··· 1150 1150 } 1151 1151 1152 1152 // t.Did (string) (string) 1153 - if len("did") > cbg.MaxLength { 1153 + if uint64(len("did")) > cbg.MaxLength { 1154 1154 return xerrors.Errorf("Value in field \"did\" was too long") 1155 1155 } 1156 1156 ··· 1161 1161 return err 1162 1162 } 1163 1163 1164 - if len(t.Did) > cbg.MaxLength { 1164 + if uint64(len(t.Did)) > cbg.MaxLength { 1165 1165 return xerrors.Errorf("Value in field t.Did was too long") 1166 1166 } 1167 1167 ··· 1173 1173 } 1174 1174 1175 1175 // t.Seq (int64) (int64) 1176 - if len("seq") > cbg.MaxLength { 1176 + if uint64(len("seq")) > cbg.MaxLength { 1177 1177 return xerrors.Errorf("Value in field \"seq\" was too long") 1178 1178 } 1179 1179 ··· 1195 1195 } 1196 1196 1197 1197 // t.Time (string) (string) 1198 - if len("time") > cbg.MaxLength { 1198 + if uint64(len("time")) > cbg.MaxLength { 1199 1199 return xerrors.Errorf("Value in field \"time\" was too long") 1200 1200 } 1201 1201 ··· 1206 1206 return err 1207 1207 } 1208 1208 1209 - if len(t.Time) > cbg.MaxLength { 1209 + if uint64(len(t.Time)) > cbg.MaxLength { 1210 1210 return xerrors.Errorf("Value in field t.Time was too long") 1211 1211 } 1212 1212 ··· 1218 1218 } 1219 1219 1220 1220 // t.MigrateTo (string) (string) 1221 - if len("migrateTo") > cbg.MaxLength { 1221 + if uint64(len("migrateTo")) > cbg.MaxLength { 1222 1222 return xerrors.Errorf("Value in field \"migrateTo\" was too long") 1223 1223 } 1224 1224 ··· 1234 1234 return err 1235 1235 } 1236 1236 } else { 1237 - if len(*t.MigrateTo) > cbg.MaxLength { 1237 + if uint64(len(*t.MigrateTo)) > cbg.MaxLength { 1238 1238 return xerrors.Errorf("Value in field t.MigrateTo was too long") 1239 1239 } 1240 1240 ··· 1377 1377 } 1378 1378 1379 1379 // t.Cid (util.LexLink) (struct) 1380 - if len("cid") > cbg.MaxLength { 1380 + if uint64(len("cid")) > cbg.MaxLength { 1381 1381 return xerrors.Errorf("Value in field \"cid\" was too long") 1382 1382 } 1383 1383 ··· 1393 1393 } 1394 1394 1395 1395 // t.Path (string) (string) 1396 - if len("path") > cbg.MaxLength { 1396 + if uint64(len("path")) > cbg.MaxLength { 1397 1397 return xerrors.Errorf("Value in field \"path\" was too long") 1398 1398 } 1399 1399 ··· 1404 1404 return err 1405 1405 } 1406 1406 1407 - if len(t.Path) > cbg.MaxLength { 1407 + if uint64(len(t.Path)) > cbg.MaxLength { 1408 1408 return xerrors.Errorf("Value in field t.Path was too long") 1409 1409 } 1410 1410 ··· 1416 1416 } 1417 1417 1418 1418 // t.Action (string) (string) 1419 - if len("action") > cbg.MaxLength { 1419 + if uint64(len("action")) > cbg.MaxLength { 1420 1420 return xerrors.Errorf("Value in field \"action\" was too long") 1421 1421 } 1422 1422 ··· 1427 1427 return err 1428 1428 } 1429 1429 1430 - if len(t.Action) > cbg.MaxLength { 1430 + if uint64(len(t.Action)) > cbg.MaxLength { 1431 1431 return xerrors.Errorf("Value in field t.Action was too long") 1432 1432 } 1433 1433 ··· 1542 1542 } 1543 1543 1544 1544 // t.Did (string) (string) 1545 - if len("did") > cbg.MaxLength { 1545 + if uint64(len("did")) > cbg.MaxLength { 1546 1546 return xerrors.Errorf("Value in field \"did\" was too long") 1547 1547 } 1548 1548 ··· 1553 1553 return err 1554 1554 } 1555 1555 1556 - if len(t.Did) > cbg.MaxLength { 1556 + if uint64(len(t.Did)) > cbg.MaxLength { 1557 1557 return xerrors.Errorf("Value in field t.Did was too long") 1558 1558 } 1559 1559 ··· 1565 1565 } 1566 1566 1567 1567 // t.Seq (int64) (int64) 1568 - if len("seq") > cbg.MaxLength { 1568 + if uint64(len("seq")) > cbg.MaxLength { 1569 1569 return xerrors.Errorf("Value in field \"seq\" was too long") 1570 1570 } 1571 1571 ··· 1587 1587 } 1588 1588 1589 1589 // t.Time (string) (string) 1590 - if len("time") > cbg.MaxLength { 1590 + if uint64(len("time")) > cbg.MaxLength { 1591 1591 return xerrors.Errorf("Value in field \"time\" was too long") 1592 1592 } 1593 1593 ··· 1598 1598 return err 1599 1599 } 1600 1600 1601 - if len(t.Time) > cbg.MaxLength { 1601 + if uint64(len(t.Time)) > cbg.MaxLength { 1602 1602 return xerrors.Errorf("Value in field t.Time was too long") 1603 1603 } 1604 1604 ··· 1719 1719 } 1720 1720 1721 1721 // t.LexiconTypeID (string) (string) 1722 - if len("$type") > cbg.MaxLength { 1722 + if uint64(len("$type")) > cbg.MaxLength { 1723 1723 return xerrors.Errorf("Value in field \"$type\" was too long") 1724 1724 } 1725 1725 ··· 1738 1738 } 1739 1739 1740 1740 // t.Values ([]*atproto.LabelDefs_SelfLabel) (slice) 1741 - if len("values") > cbg.MaxLength { 1741 + if uint64(len("values")) > cbg.MaxLength { 1742 1742 return xerrors.Errorf("Value in field \"values\" was too long") 1743 1743 } 1744 1744 ··· 1749 1749 return err 1750 1750 } 1751 1751 1752 - if len(t.Values) > cbg.MaxLength { 1752 + if uint64(len(t.Values)) > cbg.MaxLength { 1753 1753 return xerrors.Errorf("Slice value in field t.Values was too long") 1754 1754 } 1755 1755 ··· 1905 1905 } 1906 1906 1907 1907 // t.Val (string) (string) 1908 - if len("val") > cbg.MaxLength { 1908 + if uint64(len("val")) > cbg.MaxLength { 1909 1909 return xerrors.Errorf("Value in field \"val\" was too long") 1910 1910 } 1911 1911 ··· 1916 1916 return err 1917 1917 } 1918 1918 1919 - if len(t.Val) > cbg.MaxLength { 1919 + if uint64(len(t.Val)) > cbg.MaxLength { 1920 1920 return xerrors.Errorf("Value in field t.Val was too long") 1921 1921 } 1922 1922 ··· 2011 2011 // t.Cid (string) (string) 2012 2012 if t.Cid != nil { 2013 2013 2014 - if len("cid") > cbg.MaxLength { 2014 + if uint64(len("cid")) > cbg.MaxLength { 2015 2015 return xerrors.Errorf("Value in field \"cid\" was too long") 2016 2016 } 2017 2017 ··· 2027 2027 return err 2028 2028 } 2029 2029 } else { 2030 - if len(*t.Cid) > cbg.MaxLength { 2030 + if uint64(len(*t.Cid)) > cbg.MaxLength { 2031 2031 return xerrors.Errorf("Value in field t.Cid was too long") 2032 2032 } 2033 2033 ··· 2041 2041 } 2042 2042 2043 2043 // t.Cts (string) (string) 2044 - if len("cts") > cbg.MaxLength { 2044 + if uint64(len("cts")) > cbg.MaxLength { 2045 2045 return xerrors.Errorf("Value in field \"cts\" was too long") 2046 2046 } 2047 2047 ··· 2052 2052 return err 2053 2053 } 2054 2054 2055 - if len(t.Cts) > cbg.MaxLength { 2055 + if uint64(len(t.Cts)) > cbg.MaxLength { 2056 2056 return xerrors.Errorf("Value in field t.Cts was too long") 2057 2057 } 2058 2058 ··· 2066 2066 // t.Neg (bool) (bool) 2067 2067 if t.Neg != nil { 2068 2068 2069 - if len("neg") > cbg.MaxLength { 2069 + if uint64(len("neg")) > cbg.MaxLength { 2070 2070 return xerrors.Errorf("Value in field \"neg\" was too long") 2071 2071 } 2072 2072 ··· 2089 2089 } 2090 2090 2091 2091 // t.Src (string) (string) 2092 - if len("src") > cbg.MaxLength { 2092 + if uint64(len("src")) > cbg.MaxLength { 2093 2093 return xerrors.Errorf("Value in field \"src\" was too long") 2094 2094 } 2095 2095 ··· 2100 2100 return err 2101 2101 } 2102 2102 2103 - if len(t.Src) > cbg.MaxLength { 2103 + if uint64(len(t.Src)) > cbg.MaxLength { 2104 2104 return xerrors.Errorf("Value in field t.Src was too long") 2105 2105 } 2106 2106 ··· 2112 2112 } 2113 2113 2114 2114 // t.Uri (string) (string) 2115 - if len("uri") > cbg.MaxLength { 2115 + if uint64(len("uri")) > cbg.MaxLength { 2116 2116 return xerrors.Errorf("Value in field \"uri\" was too long") 2117 2117 } 2118 2118 ··· 2123 2123 return err 2124 2124 } 2125 2125 2126 - if len(t.Uri) > cbg.MaxLength { 2126 + if uint64(len(t.Uri)) > cbg.MaxLength { 2127 2127 return xerrors.Errorf("Value in field t.Uri was too long") 2128 2128 } 2129 2129 ··· 2135 2135 } 2136 2136 2137 2137 // t.Val (string) (string) 2138 - if len("val") > cbg.MaxLength { 2138 + if uint64(len("val")) > cbg.MaxLength { 2139 2139 return xerrors.Errorf("Value in field \"val\" was too long") 2140 2140 } 2141 2141 ··· 2146 2146 return err 2147 2147 } 2148 2148 2149 - if len(t.Val) > cbg.MaxLength { 2149 + if uint64(len(t.Val)) > cbg.MaxLength { 2150 2150 return xerrors.Errorf("Value in field t.Val was too long") 2151 2151 } 2152 2152 ··· 2317 2317 } 2318 2318 2319 2319 // t.Seq (int64) (int64) 2320 - if len("seq") > cbg.MaxLength { 2320 + if uint64(len("seq")) > cbg.MaxLength { 2321 2321 return xerrors.Errorf("Value in field \"seq\" was too long") 2322 2322 } 2323 2323 ··· 2339 2339 } 2340 2340 2341 2341 // t.Labels ([]*atproto.LabelDefs_Label) (slice) 2342 - if len("labels") > cbg.MaxLength { 2342 + if uint64(len("labels")) > cbg.MaxLength { 2343 2343 return xerrors.Errorf("Value in field \"labels\" was too long") 2344 2344 } 2345 2345 ··· 2350 2350 return err 2351 2351 } 2352 2352 2353 - if len(t.Labels) > cbg.MaxLength { 2353 + if uint64(len(t.Labels)) > cbg.MaxLength { 2354 2354 return xerrors.Errorf("Slice value in field t.Labels was too long") 2355 2355 } 2356 2356 ··· 2506 2506 } 2507 2507 2508 2508 // t.Name (string) (string) 2509 - if len("name") > cbg.MaxLength { 2509 + if uint64(len("name")) > cbg.MaxLength { 2510 2510 return xerrors.Errorf("Value in field \"name\" was too long") 2511 2511 } 2512 2512 ··· 2517 2517 return err 2518 2518 } 2519 2519 2520 - if len(t.Name) > cbg.MaxLength { 2520 + if uint64(len(t.Name)) > cbg.MaxLength { 2521 2521 return xerrors.Errorf("Value in field t.Name was too long") 2522 2522 } 2523 2523 ··· 2531 2531 // t.Message (string) (string) 2532 2532 if t.Message != nil { 2533 2533 2534 - if len("message") > cbg.MaxLength { 2534 + if uint64(len("message")) > cbg.MaxLength { 2535 2535 return xerrors.Errorf("Value in field \"message\" was too long") 2536 2536 } 2537 2537 ··· 2547 2547 return err 2548 2548 } 2549 2549 } else { 2550 - if len(*t.Message) > cbg.MaxLength { 2550 + if uint64(len(*t.Message)) > cbg.MaxLength { 2551 2551 return xerrors.Errorf("Value in field t.Message was too long") 2552 2552 } 2553 2553
+144 -144
api/bsky/cbor_gen.go
··· 64 64 // t.Tags ([]string) (slice) 65 65 if t.Tags != nil { 66 66 67 - if len("tags") > cbg.MaxLength { 67 + if uint64(len("tags")) > cbg.MaxLength { 68 68 return xerrors.Errorf("Value in field \"tags\" was too long") 69 69 } 70 70 ··· 75 75 return err 76 76 } 77 77 78 - if len(t.Tags) > cbg.MaxLength { 78 + if uint64(len(t.Tags)) > cbg.MaxLength { 79 79 return xerrors.Errorf("Slice value in field t.Tags was too long") 80 80 } 81 81 ··· 83 83 return err 84 84 } 85 85 for _, v := range t.Tags { 86 - if len(v) > cbg.MaxLength { 86 + if uint64(len(v)) > cbg.MaxLength { 87 87 return xerrors.Errorf("Value in field v was too long") 88 88 } 89 89 ··· 98 98 } 99 99 100 100 // t.Text (string) (string) 101 - if len("text") > cbg.MaxLength { 101 + if uint64(len("text")) > cbg.MaxLength { 102 102 return xerrors.Errorf("Value in field \"text\" was too long") 103 103 } 104 104 ··· 109 109 return err 110 110 } 111 111 112 - if len(t.Text) > cbg.MaxLength { 112 + if uint64(len(t.Text)) > cbg.MaxLength { 113 113 return xerrors.Errorf("Value in field t.Text was too long") 114 114 } 115 115 ··· 121 121 } 122 122 123 123 // t.LexiconTypeID (string) (string) 124 - if len("$type") > cbg.MaxLength { 124 + if uint64(len("$type")) > cbg.MaxLength { 125 125 return xerrors.Errorf("Value in field \"$type\" was too long") 126 126 } 127 127 ··· 142 142 // t.Embed (bsky.FeedPost_Embed) (struct) 143 143 if t.Embed != nil { 144 144 145 - if len("embed") > cbg.MaxLength { 145 + if uint64(len("embed")) > cbg.MaxLength { 146 146 return xerrors.Errorf("Value in field \"embed\" was too long") 147 147 } 148 148 ··· 161 161 // t.Langs ([]string) (slice) 162 162 if t.Langs != nil { 163 163 164 - if len("langs") > cbg.MaxLength { 164 + if uint64(len("langs")) > cbg.MaxLength { 165 165 return xerrors.Errorf("Value in field \"langs\" was too long") 166 166 } 167 167 ··· 172 172 return err 173 173 } 174 174 175 - if len(t.Langs) > cbg.MaxLength { 175 + if uint64(len(t.Langs)) > cbg.MaxLength { 176 176 return xerrors.Errorf("Slice value in field t.Langs was too long") 177 177 } 178 178 ··· 180 180 return err 181 181 } 182 182 for _, v := range t.Langs { 183 - if len(v) > cbg.MaxLength { 183 + if uint64(len(v)) > cbg.MaxLength { 184 184 return xerrors.Errorf("Value in field v was too long") 185 185 } 186 186 ··· 197 197 // t.Reply (bsky.FeedPost_ReplyRef) (struct) 198 198 if t.Reply != nil { 199 199 200 - if len("reply") > cbg.MaxLength { 200 + if uint64(len("reply")) > cbg.MaxLength { 201 201 return xerrors.Errorf("Value in field \"reply\" was too long") 202 202 } 203 203 ··· 216 216 // t.Facets ([]*bsky.RichtextFacet) (slice) 217 217 if t.Facets != nil { 218 218 219 - if len("facets") > cbg.MaxLength { 219 + if uint64(len("facets")) > cbg.MaxLength { 220 220 return xerrors.Errorf("Value in field \"facets\" was too long") 221 221 } 222 222 ··· 227 227 return err 228 228 } 229 229 230 - if len(t.Facets) > cbg.MaxLength { 230 + if uint64(len(t.Facets)) > cbg.MaxLength { 231 231 return xerrors.Errorf("Slice value in field t.Facets was too long") 232 232 } 233 233 ··· 245 245 // t.Labels (bsky.FeedPost_Labels) (struct) 246 246 if t.Labels != nil { 247 247 248 - if len("labels") > cbg.MaxLength { 248 + if uint64(len("labels")) > cbg.MaxLength { 249 249 return xerrors.Errorf("Value in field \"labels\" was too long") 250 250 } 251 251 ··· 264 264 // t.Entities ([]*bsky.FeedPost_Entity) (slice) 265 265 if t.Entities != nil { 266 266 267 - if len("entities") > cbg.MaxLength { 267 + if uint64(len("entities")) > cbg.MaxLength { 268 268 return xerrors.Errorf("Value in field \"entities\" was too long") 269 269 } 270 270 ··· 275 275 return err 276 276 } 277 277 278 - if len(t.Entities) > cbg.MaxLength { 278 + if uint64(len(t.Entities)) > cbg.MaxLength { 279 279 return xerrors.Errorf("Slice value in field t.Entities was too long") 280 280 } 281 281 ··· 291 291 } 292 292 293 293 // t.CreatedAt (string) (string) 294 - if len("createdAt") > cbg.MaxLength { 294 + if uint64(len("createdAt")) > cbg.MaxLength { 295 295 return xerrors.Errorf("Value in field \"createdAt\" was too long") 296 296 } 297 297 ··· 302 302 return err 303 303 } 304 304 305 - if len(t.CreatedAt) > cbg.MaxLength { 305 + if uint64(len(t.CreatedAt)) > cbg.MaxLength { 306 306 return xerrors.Errorf("Value in field t.CreatedAt was too long") 307 307 } 308 308 ··· 646 646 } 647 647 648 648 // t.LexiconTypeID (string) (string) 649 - if len("$type") > cbg.MaxLength { 649 + if uint64(len("$type")) > cbg.MaxLength { 650 650 return xerrors.Errorf("Value in field \"$type\" was too long") 651 651 } 652 652 ··· 665 665 } 666 666 667 667 // t.Subject (atproto.RepoStrongRef) (struct) 668 - if len("subject") > cbg.MaxLength { 668 + if uint64(len("subject")) > cbg.MaxLength { 669 669 return xerrors.Errorf("Value in field \"subject\" was too long") 670 670 } 671 671 ··· 681 681 } 682 682 683 683 // t.CreatedAt (string) (string) 684 - if len("createdAt") > cbg.MaxLength { 684 + if uint64(len("createdAt")) > cbg.MaxLength { 685 685 return xerrors.Errorf("Value in field \"createdAt\" was too long") 686 686 } 687 687 ··· 692 692 return err 693 693 } 694 694 695 - if len(t.CreatedAt) > cbg.MaxLength { 695 + if uint64(len(t.CreatedAt)) > cbg.MaxLength { 696 696 return xerrors.Errorf("Value in field t.CreatedAt was too long") 697 697 } 698 698 ··· 807 807 } 808 808 809 809 // t.Type (string) (string) 810 - if len("type") > cbg.MaxLength { 810 + if uint64(len("type")) > cbg.MaxLength { 811 811 return xerrors.Errorf("Value in field \"type\" was too long") 812 812 } 813 813 ··· 818 818 return err 819 819 } 820 820 821 - if len(t.Type) > cbg.MaxLength { 821 + if uint64(len(t.Type)) > cbg.MaxLength { 822 822 return xerrors.Errorf("Value in field t.Type was too long") 823 823 } 824 824 ··· 830 830 } 831 831 832 832 // t.Index (bsky.FeedPost_TextSlice) (struct) 833 - if len("index") > cbg.MaxLength { 833 + if uint64(len("index")) > cbg.MaxLength { 834 834 return xerrors.Errorf("Value in field \"index\" was too long") 835 835 } 836 836 ··· 846 846 } 847 847 848 848 // t.Value (string) (string) 849 - if len("value") > cbg.MaxLength { 849 + if uint64(len("value")) > cbg.MaxLength { 850 850 return xerrors.Errorf("Value in field \"value\" was too long") 851 851 } 852 852 ··· 857 857 return err 858 858 } 859 859 860 - if len(t.Value) > cbg.MaxLength { 860 + if uint64(len(t.Value)) > cbg.MaxLength { 861 861 return xerrors.Errorf("Value in field t.Value was too long") 862 862 } 863 863 ··· 972 972 } 973 973 974 974 // t.Root (atproto.RepoStrongRef) (struct) 975 - if len("root") > cbg.MaxLength { 975 + if uint64(len("root")) > cbg.MaxLength { 976 976 return xerrors.Errorf("Value in field \"root\" was too long") 977 977 } 978 978 ··· 988 988 } 989 989 990 990 // t.Parent (atproto.RepoStrongRef) (struct) 991 - if len("parent") > cbg.MaxLength { 991 + if uint64(len("parent")) > cbg.MaxLength { 992 992 return xerrors.Errorf("Value in field \"parent\" was too long") 993 993 } 994 994 ··· 1105 1105 } 1106 1106 1107 1107 // t.End (int64) (int64) 1108 - if len("end") > cbg.MaxLength { 1108 + if uint64(len("end")) > cbg.MaxLength { 1109 1109 return xerrors.Errorf("Value in field \"end\" was too long") 1110 1110 } 1111 1111 ··· 1127 1127 } 1128 1128 1129 1129 // t.Start (int64) (int64) 1130 - if len("start") > cbg.MaxLength { 1130 + if uint64(len("start")) > cbg.MaxLength { 1131 1131 return xerrors.Errorf("Value in field \"start\" was too long") 1132 1132 } 1133 1133 ··· 1262 1262 } 1263 1263 1264 1264 // t.LexiconTypeID (string) (string) 1265 - if len("$type") > cbg.MaxLength { 1265 + if uint64(len("$type")) > cbg.MaxLength { 1266 1266 return xerrors.Errorf("Value in field \"$type\" was too long") 1267 1267 } 1268 1268 ··· 1281 1281 } 1282 1282 1283 1283 // t.Images ([]*bsky.EmbedImages_Image) (slice) 1284 - if len("images") > cbg.MaxLength { 1284 + if uint64(len("images")) > cbg.MaxLength { 1285 1285 return xerrors.Errorf("Value in field \"images\" was too long") 1286 1286 } 1287 1287 ··· 1292 1292 return err 1293 1293 } 1294 1294 1295 - if len(t.Images) > cbg.MaxLength { 1295 + if uint64(len(t.Images)) > cbg.MaxLength { 1296 1296 return xerrors.Errorf("Slice value in field t.Images was too long") 1297 1297 } 1298 1298 ··· 1428 1428 } 1429 1429 1430 1430 // t.LexiconTypeID (string) (string) 1431 - if len("$type") > cbg.MaxLength { 1431 + if uint64(len("$type")) > cbg.MaxLength { 1432 1432 return xerrors.Errorf("Value in field \"$type\" was too long") 1433 1433 } 1434 1434 ··· 1447 1447 } 1448 1448 1449 1449 // t.External (bsky.EmbedExternal_External) (struct) 1450 - if len("external") > cbg.MaxLength { 1450 + if uint64(len("external")) > cbg.MaxLength { 1451 1451 return xerrors.Errorf("Value in field \"external\" was too long") 1452 1452 } 1453 1453 ··· 1560 1560 } 1561 1561 1562 1562 // t.Uri (string) (string) 1563 - if len("uri") > cbg.MaxLength { 1563 + if uint64(len("uri")) > cbg.MaxLength { 1564 1564 return xerrors.Errorf("Value in field \"uri\" was too long") 1565 1565 } 1566 1566 ··· 1571 1571 return err 1572 1572 } 1573 1573 1574 - if len(t.Uri) > cbg.MaxLength { 1574 + if uint64(len(t.Uri)) > cbg.MaxLength { 1575 1575 return xerrors.Errorf("Value in field t.Uri was too long") 1576 1576 } 1577 1577 ··· 1585 1585 // t.Thumb (util.LexBlob) (struct) 1586 1586 if t.Thumb != nil { 1587 1587 1588 - if len("thumb") > cbg.MaxLength { 1588 + if uint64(len("thumb")) > cbg.MaxLength { 1589 1589 return xerrors.Errorf("Value in field \"thumb\" was too long") 1590 1590 } 1591 1591 ··· 1602 1602 } 1603 1603 1604 1604 // t.Title (string) (string) 1605 - if len("title") > cbg.MaxLength { 1605 + if uint64(len("title")) > cbg.MaxLength { 1606 1606 return xerrors.Errorf("Value in field \"title\" was too long") 1607 1607 } 1608 1608 ··· 1613 1613 return err 1614 1614 } 1615 1615 1616 - if len(t.Title) > cbg.MaxLength { 1616 + if uint64(len(t.Title)) > cbg.MaxLength { 1617 1617 return xerrors.Errorf("Value in field t.Title was too long") 1618 1618 } 1619 1619 ··· 1625 1625 } 1626 1626 1627 1627 // t.Description (string) (string) 1628 - if len("description") > cbg.MaxLength { 1628 + if uint64(len("description")) > cbg.MaxLength { 1629 1629 return xerrors.Errorf("Value in field \"description\" was too long") 1630 1630 } 1631 1631 ··· 1636 1636 return err 1637 1637 } 1638 1638 1639 - if len(t.Description) > cbg.MaxLength { 1639 + if uint64(len(t.Description)) > cbg.MaxLength { 1640 1640 return xerrors.Errorf("Value in field t.Description was too long") 1641 1641 } 1642 1642 ··· 1767 1767 } 1768 1768 1769 1769 // t.Alt (string) (string) 1770 - if len("alt") > cbg.MaxLength { 1770 + if uint64(len("alt")) > cbg.MaxLength { 1771 1771 return xerrors.Errorf("Value in field \"alt\" was too long") 1772 1772 } 1773 1773 ··· 1778 1778 return err 1779 1779 } 1780 1780 1781 - if len(t.Alt) > cbg.MaxLength { 1781 + if uint64(len(t.Alt)) > cbg.MaxLength { 1782 1782 return xerrors.Errorf("Value in field t.Alt was too long") 1783 1783 } 1784 1784 ··· 1790 1790 } 1791 1791 1792 1792 // t.Image (util.LexBlob) (struct) 1793 - if len("image") > cbg.MaxLength { 1793 + if uint64(len("image")) > cbg.MaxLength { 1794 1794 return xerrors.Errorf("Value in field \"image\" was too long") 1795 1795 } 1796 1796 ··· 1808 1808 // t.AspectRatio (bsky.EmbedImages_AspectRatio) (struct) 1809 1809 if t.AspectRatio != nil { 1810 1810 1811 - if len("aspectRatio") > cbg.MaxLength { 1811 + if uint64(len("aspectRatio")) > cbg.MaxLength { 1812 1812 return xerrors.Errorf("Value in field \"aspectRatio\" was too long") 1813 1813 } 1814 1814 ··· 1937 1937 } 1938 1938 1939 1939 // t.LexiconTypeID (string) (string) 1940 - if len("$type") > cbg.MaxLength { 1940 + if uint64(len("$type")) > cbg.MaxLength { 1941 1941 return xerrors.Errorf("Value in field \"$type\" was too long") 1942 1942 } 1943 1943 ··· 1956 1956 } 1957 1957 1958 1958 // t.Subject (string) (string) 1959 - if len("subject") > cbg.MaxLength { 1959 + if uint64(len("subject")) > cbg.MaxLength { 1960 1960 return xerrors.Errorf("Value in field \"subject\" was too long") 1961 1961 } 1962 1962 ··· 1967 1967 return err 1968 1968 } 1969 1969 1970 - if len(t.Subject) > cbg.MaxLength { 1970 + if uint64(len(t.Subject)) > cbg.MaxLength { 1971 1971 return xerrors.Errorf("Value in field t.Subject was too long") 1972 1972 } 1973 1973 ··· 1979 1979 } 1980 1980 1981 1981 // t.CreatedAt (string) (string) 1982 - if len("createdAt") > cbg.MaxLength { 1982 + if uint64(len("createdAt")) > cbg.MaxLength { 1983 1983 return xerrors.Errorf("Value in field \"createdAt\" was too long") 1984 1984 } 1985 1985 ··· 1990 1990 return err 1991 1991 } 1992 1992 1993 - if len(t.CreatedAt) > cbg.MaxLength { 1993 + if uint64(len(t.CreatedAt)) > cbg.MaxLength { 1994 1994 return xerrors.Errorf("Value in field t.CreatedAt was too long") 1995 1995 } 1996 1996 ··· 2117 2117 } 2118 2118 2119 2119 // t.LexiconTypeID (string) (string) 2120 - if len("$type") > cbg.MaxLength { 2120 + if uint64(len("$type")) > cbg.MaxLength { 2121 2121 return xerrors.Errorf("Value in field \"$type\" was too long") 2122 2122 } 2123 2123 ··· 2138 2138 // t.Avatar (util.LexBlob) (struct) 2139 2139 if t.Avatar != nil { 2140 2140 2141 - if len("avatar") > cbg.MaxLength { 2141 + if uint64(len("avatar")) > cbg.MaxLength { 2142 2142 return xerrors.Errorf("Value in field \"avatar\" was too long") 2143 2143 } 2144 2144 ··· 2157 2157 // t.Banner (util.LexBlob) (struct) 2158 2158 if t.Banner != nil { 2159 2159 2160 - if len("banner") > cbg.MaxLength { 2160 + if uint64(len("banner")) > cbg.MaxLength { 2161 2161 return xerrors.Errorf("Value in field \"banner\" was too long") 2162 2162 } 2163 2163 ··· 2176 2176 // t.Labels (bsky.ActorProfile_Labels) (struct) 2177 2177 if t.Labels != nil { 2178 2178 2179 - if len("labels") > cbg.MaxLength { 2179 + if uint64(len("labels")) > cbg.MaxLength { 2180 2180 return xerrors.Errorf("Value in field \"labels\" was too long") 2181 2181 } 2182 2182 ··· 2195 2195 // t.Description (string) (string) 2196 2196 if t.Description != nil { 2197 2197 2198 - if len("description") > cbg.MaxLength { 2198 + if uint64(len("description")) > cbg.MaxLength { 2199 2199 return xerrors.Errorf("Value in field \"description\" was too long") 2200 2200 } 2201 2201 ··· 2211 2211 return err 2212 2212 } 2213 2213 } else { 2214 - if len(*t.Description) > cbg.MaxLength { 2214 + if uint64(len(*t.Description)) > cbg.MaxLength { 2215 2215 return xerrors.Errorf("Value in field t.Description was too long") 2216 2216 } 2217 2217 ··· 2227 2227 // t.DisplayName (string) (string) 2228 2228 if t.DisplayName != nil { 2229 2229 2230 - if len("displayName") > cbg.MaxLength { 2230 + if uint64(len("displayName")) > cbg.MaxLength { 2231 2231 return xerrors.Errorf("Value in field \"displayName\" was too long") 2232 2232 } 2233 2233 ··· 2243 2243 return err 2244 2244 } 2245 2245 } else { 2246 - if len(*t.DisplayName) > cbg.MaxLength { 2246 + if uint64(len(*t.DisplayName)) > cbg.MaxLength { 2247 2247 return xerrors.Errorf("Value in field t.DisplayName was too long") 2248 2248 } 2249 2249 ··· 2431 2431 } 2432 2432 2433 2433 // t.LexiconTypeID (string) (string) 2434 - if len("$type") > cbg.MaxLength { 2434 + if uint64(len("$type")) > cbg.MaxLength { 2435 2435 return xerrors.Errorf("Value in field \"$type\" was too long") 2436 2436 } 2437 2437 ··· 2450 2450 } 2451 2451 2452 2452 // t.Record (atproto.RepoStrongRef) (struct) 2453 - if len("record") > cbg.MaxLength { 2453 + if uint64(len("record")) > cbg.MaxLength { 2454 2454 return xerrors.Errorf("Value in field \"record\" was too long") 2455 2455 } 2456 2456 ··· 2558 2558 } 2559 2559 2560 2560 // t.LexiconTypeID (string) (string) 2561 - if len("$type") > cbg.MaxLength { 2561 + if uint64(len("$type")) > cbg.MaxLength { 2562 2562 return xerrors.Errorf("Value in field \"$type\" was too long") 2563 2563 } 2564 2564 ··· 2577 2577 } 2578 2578 2579 2579 // t.Subject (atproto.RepoStrongRef) (struct) 2580 - if len("subject") > cbg.MaxLength { 2580 + if uint64(len("subject")) > cbg.MaxLength { 2581 2581 return xerrors.Errorf("Value in field \"subject\" was too long") 2582 2582 } 2583 2583 ··· 2593 2593 } 2594 2594 2595 2595 // t.CreatedAt (string) (string) 2596 - if len("createdAt") > cbg.MaxLength { 2596 + if uint64(len("createdAt")) > cbg.MaxLength { 2597 2597 return xerrors.Errorf("Value in field \"createdAt\" was too long") 2598 2598 } 2599 2599 ··· 2604 2604 return err 2605 2605 } 2606 2606 2607 - if len(t.CreatedAt) > cbg.MaxLength { 2607 + if uint64(len(t.CreatedAt)) > cbg.MaxLength { 2608 2608 return xerrors.Errorf("Value in field t.CreatedAt was too long") 2609 2609 } 2610 2610 ··· 2719 2719 } 2720 2720 2721 2721 // t.Index (bsky.RichtextFacet_ByteSlice) (struct) 2722 - if len("index") > cbg.MaxLength { 2722 + if uint64(len("index")) > cbg.MaxLength { 2723 2723 return xerrors.Errorf("Value in field \"index\" was too long") 2724 2724 } 2725 2725 ··· 2735 2735 } 2736 2736 2737 2737 // t.Features ([]*bsky.RichtextFacet_Features_Elem) (slice) 2738 - if len("features") > cbg.MaxLength { 2738 + if uint64(len("features")) > cbg.MaxLength { 2739 2739 return xerrors.Errorf("Value in field \"features\" was too long") 2740 2740 } 2741 2741 ··· 2746 2746 return err 2747 2747 } 2748 2748 2749 - if len(t.Features) > cbg.MaxLength { 2749 + if uint64(len(t.Features)) > cbg.MaxLength { 2750 2750 return xerrors.Errorf("Slice value in field t.Features was too long") 2751 2751 } 2752 2752 ··· 2891 2891 } 2892 2892 2893 2893 // t.ByteEnd (int64) (int64) 2894 - if len("byteEnd") > cbg.MaxLength { 2894 + if uint64(len("byteEnd")) > cbg.MaxLength { 2895 2895 return xerrors.Errorf("Value in field \"byteEnd\" was too long") 2896 2896 } 2897 2897 ··· 2913 2913 } 2914 2914 2915 2915 // t.ByteStart (int64) (int64) 2916 - if len("byteStart") > cbg.MaxLength { 2916 + if uint64(len("byteStart")) > cbg.MaxLength { 2917 2917 return xerrors.Errorf("Value in field \"byteStart\" was too long") 2918 2918 } 2919 2919 ··· 3048 3048 } 3049 3049 3050 3050 // t.Uri (string) (string) 3051 - if len("uri") > cbg.MaxLength { 3051 + if uint64(len("uri")) > cbg.MaxLength { 3052 3052 return xerrors.Errorf("Value in field \"uri\" was too long") 3053 3053 } 3054 3054 ··· 3059 3059 return err 3060 3060 } 3061 3061 3062 - if len(t.Uri) > cbg.MaxLength { 3062 + if uint64(len(t.Uri)) > cbg.MaxLength { 3063 3063 return xerrors.Errorf("Value in field t.Uri was too long") 3064 3064 } 3065 3065 ··· 3071 3071 } 3072 3072 3073 3073 // t.LexiconTypeID (string) (string) 3074 - if len("$type") > cbg.MaxLength { 3074 + if uint64(len("$type")) > cbg.MaxLength { 3075 3075 return xerrors.Errorf("Value in field \"$type\" was too long") 3076 3076 } 3077 3077 ··· 3173 3173 } 3174 3174 3175 3175 // t.Did (string) (string) 3176 - if len("did") > cbg.MaxLength { 3176 + if uint64(len("did")) > cbg.MaxLength { 3177 3177 return xerrors.Errorf("Value in field \"did\" was too long") 3178 3178 } 3179 3179 ··· 3184 3184 return err 3185 3185 } 3186 3186 3187 - if len(t.Did) > cbg.MaxLength { 3187 + if uint64(len(t.Did)) > cbg.MaxLength { 3188 3188 return xerrors.Errorf("Value in field t.Did was too long") 3189 3189 } 3190 3190 ··· 3196 3196 } 3197 3197 3198 3198 // t.LexiconTypeID (string) (string) 3199 - if len("$type") > cbg.MaxLength { 3199 + if uint64(len("$type")) > cbg.MaxLength { 3200 3200 return xerrors.Errorf("Value in field \"$type\" was too long") 3201 3201 } 3202 3202 ··· 3298 3298 } 3299 3299 3300 3300 // t.Tag (string) (string) 3301 - if len("tag") > cbg.MaxLength { 3301 + if uint64(len("tag")) > cbg.MaxLength { 3302 3302 return xerrors.Errorf("Value in field \"tag\" was too long") 3303 3303 } 3304 3304 ··· 3309 3309 return err 3310 3310 } 3311 3311 3312 - if len(t.Tag) > cbg.MaxLength { 3312 + if uint64(len(t.Tag)) > cbg.MaxLength { 3313 3313 return xerrors.Errorf("Value in field t.Tag was too long") 3314 3314 } 3315 3315 ··· 3321 3321 } 3322 3322 3323 3323 // t.LexiconTypeID (string) (string) 3324 - if len("$type") > cbg.MaxLength { 3324 + if uint64(len("$type")) > cbg.MaxLength { 3325 3325 return xerrors.Errorf("Value in field \"$type\" was too long") 3326 3326 } 3327 3327 ··· 3423 3423 } 3424 3424 3425 3425 // t.LexiconTypeID (string) (string) 3426 - if len("$type") > cbg.MaxLength { 3426 + if uint64(len("$type")) > cbg.MaxLength { 3427 3427 return xerrors.Errorf("Value in field \"$type\" was too long") 3428 3428 } 3429 3429 ··· 3442 3442 } 3443 3443 3444 3444 // t.Media (bsky.EmbedRecordWithMedia_Media) (struct) 3445 - if len("media") > cbg.MaxLength { 3445 + if uint64(len("media")) > cbg.MaxLength { 3446 3446 return xerrors.Errorf("Value in field \"media\" was too long") 3447 3447 } 3448 3448 ··· 3458 3458 } 3459 3459 3460 3460 // t.Record (bsky.EmbedRecord) (struct) 3461 - if len("record") > cbg.MaxLength { 3461 + if uint64(len("record")) > cbg.MaxLength { 3462 3462 return xerrors.Errorf("Value in field \"record\" was too long") 3463 3463 } 3464 3464 ··· 3586 3586 } 3587 3587 3588 3588 // t.Uri (string) (string) 3589 - if len("uri") > cbg.MaxLength { 3589 + if uint64(len("uri")) > cbg.MaxLength { 3590 3590 return xerrors.Errorf("Value in field \"uri\" was too long") 3591 3591 } 3592 3592 ··· 3597 3597 return err 3598 3598 } 3599 3599 3600 - if len(t.Uri) > cbg.MaxLength { 3600 + if uint64(len(t.Uri)) > cbg.MaxLength { 3601 3601 return xerrors.Errorf("Value in field t.Uri was too long") 3602 3602 } 3603 3603 ··· 3609 3609 } 3610 3610 3611 3611 // t.LexiconTypeID (string) (string) 3612 - if len("$type") > cbg.MaxLength { 3612 + if uint64(len("$type")) > cbg.MaxLength { 3613 3613 return xerrors.Errorf("Value in field \"$type\" was too long") 3614 3614 } 3615 3615 ··· 3628 3628 } 3629 3629 3630 3630 // t.NotFound (bool) (bool) 3631 - if len("notFound") > cbg.MaxLength { 3631 + if uint64(len("notFound")) > cbg.MaxLength { 3632 3632 return xerrors.Errorf("Value in field \"notFound\" was too long") 3633 3633 } 3634 3634 ··· 3745 3745 } 3746 3746 3747 3747 // t.LexiconTypeID (string) (string) 3748 - if len("$type") > cbg.MaxLength { 3748 + if uint64(len("$type")) > cbg.MaxLength { 3749 3749 return xerrors.Errorf("Value in field \"$type\" was too long") 3750 3750 } 3751 3751 ··· 3764 3764 } 3765 3765 3766 3766 // t.Subject (string) (string) 3767 - if len("subject") > cbg.MaxLength { 3767 + if uint64(len("subject")) > cbg.MaxLength { 3768 3768 return xerrors.Errorf("Value in field \"subject\" was too long") 3769 3769 } 3770 3770 ··· 3775 3775 return err 3776 3776 } 3777 3777 3778 - if len(t.Subject) > cbg.MaxLength { 3778 + if uint64(len(t.Subject)) > cbg.MaxLength { 3779 3779 return xerrors.Errorf("Value in field t.Subject was too long") 3780 3780 } 3781 3781 ··· 3787 3787 } 3788 3788 3789 3789 // t.CreatedAt (string) (string) 3790 - if len("createdAt") > cbg.MaxLength { 3790 + if uint64(len("createdAt")) > cbg.MaxLength { 3791 3791 return xerrors.Errorf("Value in field \"createdAt\" was too long") 3792 3792 } 3793 3793 ··· 3798 3798 return err 3799 3799 } 3800 3800 3801 - if len(t.CreatedAt) > cbg.MaxLength { 3801 + if uint64(len(t.CreatedAt)) > cbg.MaxLength { 3802 3802 return xerrors.Errorf("Value in field t.CreatedAt was too long") 3803 3803 } 3804 3804 ··· 3921 3921 } 3922 3922 3923 3923 // t.Name (string) (string) 3924 - if len("name") > cbg.MaxLength { 3924 + if uint64(len("name")) > cbg.MaxLength { 3925 3925 return xerrors.Errorf("Value in field \"name\" was too long") 3926 3926 } 3927 3927 ··· 3932 3932 return err 3933 3933 } 3934 3934 3935 - if len(t.Name) > cbg.MaxLength { 3935 + if uint64(len(t.Name)) > cbg.MaxLength { 3936 3936 return xerrors.Errorf("Value in field t.Name was too long") 3937 3937 } 3938 3938 ··· 3944 3944 } 3945 3945 3946 3946 // t.LexiconTypeID (string) (string) 3947 - if len("$type") > cbg.MaxLength { 3947 + if uint64(len("$type")) > cbg.MaxLength { 3948 3948 return xerrors.Errorf("Value in field \"$type\" was too long") 3949 3949 } 3950 3950 ··· 3965 3965 // t.Avatar (util.LexBlob) (struct) 3966 3966 if t.Avatar != nil { 3967 3967 3968 - if len("avatar") > cbg.MaxLength { 3968 + if uint64(len("avatar")) > cbg.MaxLength { 3969 3969 return xerrors.Errorf("Value in field \"avatar\" was too long") 3970 3970 } 3971 3971 ··· 3984 3984 // t.Labels (bsky.GraphList_Labels) (struct) 3985 3985 if t.Labels != nil { 3986 3986 3987 - if len("labels") > cbg.MaxLength { 3987 + if uint64(len("labels")) > cbg.MaxLength { 3988 3988 return xerrors.Errorf("Value in field \"labels\" was too long") 3989 3989 } 3990 3990 ··· 4001 4001 } 4002 4002 4003 4003 // t.Purpose (string) (string) 4004 - if len("purpose") > cbg.MaxLength { 4004 + if uint64(len("purpose")) > cbg.MaxLength { 4005 4005 return xerrors.Errorf("Value in field \"purpose\" was too long") 4006 4006 } 4007 4007 ··· 4017 4017 return err 4018 4018 } 4019 4019 } else { 4020 - if len(*t.Purpose) > cbg.MaxLength { 4020 + if uint64(len(*t.Purpose)) > cbg.MaxLength { 4021 4021 return xerrors.Errorf("Value in field t.Purpose was too long") 4022 4022 } 4023 4023 ··· 4030 4030 } 4031 4031 4032 4032 // t.CreatedAt (string) (string) 4033 - if len("createdAt") > cbg.MaxLength { 4033 + if uint64(len("createdAt")) > cbg.MaxLength { 4034 4034 return xerrors.Errorf("Value in field \"createdAt\" was too long") 4035 4035 } 4036 4036 ··· 4041 4041 return err 4042 4042 } 4043 4043 4044 - if len(t.CreatedAt) > cbg.MaxLength { 4044 + if uint64(len(t.CreatedAt)) > cbg.MaxLength { 4045 4045 return xerrors.Errorf("Value in field t.CreatedAt was too long") 4046 4046 } 4047 4047 ··· 4055 4055 // t.Description (string) (string) 4056 4056 if t.Description != nil { 4057 4057 4058 - if len("description") > cbg.MaxLength { 4058 + if uint64(len("description")) > cbg.MaxLength { 4059 4059 return xerrors.Errorf("Value in field \"description\" was too long") 4060 4060 } 4061 4061 ··· 4071 4071 return err 4072 4072 } 4073 4073 } else { 4074 - if len(*t.Description) > cbg.MaxLength { 4074 + if uint64(len(*t.Description)) > cbg.MaxLength { 4075 4075 return xerrors.Errorf("Value in field t.Description was too long") 4076 4076 } 4077 4077 ··· 4087 4087 // t.DescriptionFacets ([]*bsky.RichtextFacet) (slice) 4088 4088 if t.DescriptionFacets != nil { 4089 4089 4090 - if len("descriptionFacets") > cbg.MaxLength { 4090 + if uint64(len("descriptionFacets")) > cbg.MaxLength { 4091 4091 return xerrors.Errorf("Value in field \"descriptionFacets\" was too long") 4092 4092 } 4093 4093 ··· 4098 4098 return err 4099 4099 } 4100 4100 4101 - if len(t.DescriptionFacets) > cbg.MaxLength { 4101 + if uint64(len(t.DescriptionFacets)) > cbg.MaxLength { 4102 4102 return xerrors.Errorf("Slice value in field t.DescriptionFacets was too long") 4103 4103 } 4104 4104 ··· 4339 4339 } 4340 4340 4341 4341 // t.List (string) (string) 4342 - if len("list") > cbg.MaxLength { 4342 + if uint64(len("list")) > cbg.MaxLength { 4343 4343 return xerrors.Errorf("Value in field \"list\" was too long") 4344 4344 } 4345 4345 ··· 4350 4350 return err 4351 4351 } 4352 4352 4353 - if len(t.List) > cbg.MaxLength { 4353 + if uint64(len(t.List)) > cbg.MaxLength { 4354 4354 return xerrors.Errorf("Value in field t.List was too long") 4355 4355 } 4356 4356 ··· 4362 4362 } 4363 4363 4364 4364 // t.LexiconTypeID (string) (string) 4365 - if len("$type") > cbg.MaxLength { 4365 + if uint64(len("$type")) > cbg.MaxLength { 4366 4366 return xerrors.Errorf("Value in field \"$type\" was too long") 4367 4367 } 4368 4368 ··· 4381 4381 } 4382 4382 4383 4383 // t.Subject (string) (string) 4384 - if len("subject") > cbg.MaxLength { 4384 + if uint64(len("subject")) > cbg.MaxLength { 4385 4385 return xerrors.Errorf("Value in field \"subject\" was too long") 4386 4386 } 4387 4387 ··· 4392 4392 return err 4393 4393 } 4394 4394 4395 - if len(t.Subject) > cbg.MaxLength { 4395 + if uint64(len(t.Subject)) > cbg.MaxLength { 4396 4396 return xerrors.Errorf("Value in field t.Subject was too long") 4397 4397 } 4398 4398 ··· 4404 4404 } 4405 4405 4406 4406 // t.CreatedAt (string) (string) 4407 - if len("createdAt") > cbg.MaxLength { 4407 + if uint64(len("createdAt")) > cbg.MaxLength { 4408 4408 return xerrors.Errorf("Value in field \"createdAt\" was too long") 4409 4409 } 4410 4410 ··· 4415 4415 return err 4416 4416 } 4417 4417 4418 - if len(t.CreatedAt) > cbg.MaxLength { 4418 + if uint64(len(t.CreatedAt)) > cbg.MaxLength { 4419 4419 return xerrors.Errorf("Value in field t.CreatedAt was too long") 4420 4420 } 4421 4421 ··· 4549 4549 } 4550 4550 4551 4551 // t.Did (string) (string) 4552 - if len("did") > cbg.MaxLength { 4552 + if uint64(len("did")) > cbg.MaxLength { 4553 4553 return xerrors.Errorf("Value in field \"did\" was too long") 4554 4554 } 4555 4555 ··· 4560 4560 return err 4561 4561 } 4562 4562 4563 - if len(t.Did) > cbg.MaxLength { 4563 + if uint64(len(t.Did)) > cbg.MaxLength { 4564 4564 return xerrors.Errorf("Value in field t.Did was too long") 4565 4565 } 4566 4566 ··· 4572 4572 } 4573 4573 4574 4574 // t.LexiconTypeID (string) (string) 4575 - if len("$type") > cbg.MaxLength { 4575 + if uint64(len("$type")) > cbg.MaxLength { 4576 4576 return xerrors.Errorf("Value in field \"$type\" was too long") 4577 4577 } 4578 4578 ··· 4593 4593 // t.Avatar (util.LexBlob) (struct) 4594 4594 if t.Avatar != nil { 4595 4595 4596 - if len("avatar") > cbg.MaxLength { 4596 + if uint64(len("avatar")) > cbg.MaxLength { 4597 4597 return xerrors.Errorf("Value in field \"avatar\" was too long") 4598 4598 } 4599 4599 ··· 4612 4612 // t.Labels (bsky.FeedGenerator_Labels) (struct) 4613 4613 if t.Labels != nil { 4614 4614 4615 - if len("labels") > cbg.MaxLength { 4615 + if uint64(len("labels")) > cbg.MaxLength { 4616 4616 return xerrors.Errorf("Value in field \"labels\" was too long") 4617 4617 } 4618 4618 ··· 4629 4629 } 4630 4630 4631 4631 // t.CreatedAt (string) (string) 4632 - if len("createdAt") > cbg.MaxLength { 4632 + if uint64(len("createdAt")) > cbg.MaxLength { 4633 4633 return xerrors.Errorf("Value in field \"createdAt\" was too long") 4634 4634 } 4635 4635 ··· 4640 4640 return err 4641 4641 } 4642 4642 4643 - if len(t.CreatedAt) > cbg.MaxLength { 4643 + if uint64(len(t.CreatedAt)) > cbg.MaxLength { 4644 4644 return xerrors.Errorf("Value in field t.CreatedAt was too long") 4645 4645 } 4646 4646 ··· 4654 4654 // t.Description (string) (string) 4655 4655 if t.Description != nil { 4656 4656 4657 - if len("description") > cbg.MaxLength { 4657 + if uint64(len("description")) > cbg.MaxLength { 4658 4658 return xerrors.Errorf("Value in field \"description\" was too long") 4659 4659 } 4660 4660 ··· 4670 4670 return err 4671 4671 } 4672 4672 } else { 4673 - if len(*t.Description) > cbg.MaxLength { 4673 + if uint64(len(*t.Description)) > cbg.MaxLength { 4674 4674 return xerrors.Errorf("Value in field t.Description was too long") 4675 4675 } 4676 4676 ··· 4684 4684 } 4685 4685 4686 4686 // t.DisplayName (string) (string) 4687 - if len("displayName") > cbg.MaxLength { 4687 + if uint64(len("displayName")) > cbg.MaxLength { 4688 4688 return xerrors.Errorf("Value in field \"displayName\" was too long") 4689 4689 } 4690 4690 ··· 4695 4695 return err 4696 4696 } 4697 4697 4698 - if len(t.DisplayName) > cbg.MaxLength { 4698 + if uint64(len(t.DisplayName)) > cbg.MaxLength { 4699 4699 return xerrors.Errorf("Value in field t.DisplayName was too long") 4700 4700 } 4701 4701 ··· 4709 4709 // t.DescriptionFacets ([]*bsky.RichtextFacet) (slice) 4710 4710 if t.DescriptionFacets != nil { 4711 4711 4712 - if len("descriptionFacets") > cbg.MaxLength { 4712 + if uint64(len("descriptionFacets")) > cbg.MaxLength { 4713 4713 return xerrors.Errorf("Value in field \"descriptionFacets\" was too long") 4714 4714 } 4715 4715 ··· 4720 4720 return err 4721 4721 } 4722 4722 4723 - if len(t.DescriptionFacets) > cbg.MaxLength { 4723 + if uint64(len(t.DescriptionFacets)) > cbg.MaxLength { 4724 4724 return xerrors.Errorf("Slice value in field t.DescriptionFacets was too long") 4725 4725 } 4726 4726 ··· 4951 4951 } 4952 4952 4953 4953 // t.LexiconTypeID (string) (string) 4954 - if len("$type") > cbg.MaxLength { 4954 + if uint64(len("$type")) > cbg.MaxLength { 4955 4955 return xerrors.Errorf("Value in field \"$type\" was too long") 4956 4956 } 4957 4957 ··· 4970 4970 } 4971 4971 4972 4972 // t.Subject (string) (string) 4973 - if len("subject") > cbg.MaxLength { 4973 + if uint64(len("subject")) > cbg.MaxLength { 4974 4974 return xerrors.Errorf("Value in field \"subject\" was too long") 4975 4975 } 4976 4976 ··· 4981 4981 return err 4982 4982 } 4983 4983 4984 - if len(t.Subject) > cbg.MaxLength { 4984 + if uint64(len(t.Subject)) > cbg.MaxLength { 4985 4985 return xerrors.Errorf("Value in field t.Subject was too long") 4986 4986 } 4987 4987 ··· 4993 4993 } 4994 4994 4995 4995 // t.CreatedAt (string) (string) 4996 - if len("createdAt") > cbg.MaxLength { 4996 + if uint64(len("createdAt")) > cbg.MaxLength { 4997 4997 return xerrors.Errorf("Value in field \"createdAt\" was too long") 4998 4998 } 4999 4999 ··· 5004 5004 return err 5005 5005 } 5006 5006 5007 - if len(t.CreatedAt) > cbg.MaxLength { 5007 + if uint64(len(t.CreatedAt)) > cbg.MaxLength { 5008 5008 return xerrors.Errorf("Value in field t.CreatedAt was too long") 5009 5009 } 5010 5010 ··· 5110 5110 } 5111 5111 5112 5112 // t.Width (int64) (int64) 5113 - if len("width") > cbg.MaxLength { 5113 + if uint64(len("width")) > cbg.MaxLength { 5114 5114 return xerrors.Errorf("Value in field \"width\" was too long") 5115 5115 } 5116 5116 ··· 5132 5132 } 5133 5133 5134 5134 // t.Height (int64) (int64) 5135 - if len("height") > cbg.MaxLength { 5135 + if uint64(len("height")) > cbg.MaxLength { 5136 5136 return xerrors.Errorf("Value in field \"height\" was too long") 5137 5137 } 5138 5138 ··· 5272 5272 } 5273 5273 5274 5274 // t.Post (string) (string) 5275 - if len("post") > cbg.MaxLength { 5275 + if uint64(len("post")) > cbg.MaxLength { 5276 5276 return xerrors.Errorf("Value in field \"post\" was too long") 5277 5277 } 5278 5278 ··· 5283 5283 return err 5284 5284 } 5285 5285 5286 - if len(t.Post) > cbg.MaxLength { 5286 + if uint64(len(t.Post)) > cbg.MaxLength { 5287 5287 return xerrors.Errorf("Value in field t.Post was too long") 5288 5288 } 5289 5289 ··· 5295 5295 } 5296 5296 5297 5297 // t.LexiconTypeID (string) (string) 5298 - if len("$type") > cbg.MaxLength { 5298 + if uint64(len("$type")) > cbg.MaxLength { 5299 5299 return xerrors.Errorf("Value in field \"$type\" was too long") 5300 5300 } 5301 5301 ··· 5316 5316 // t.Allow ([]*bsky.FeedThreadgate_Allow_Elem) (slice) 5317 5317 if t.Allow != nil { 5318 5318 5319 - if len("allow") > cbg.MaxLength { 5319 + if uint64(len("allow")) > cbg.MaxLength { 5320 5320 return xerrors.Errorf("Value in field \"allow\" was too long") 5321 5321 } 5322 5322 ··· 5327 5327 return err 5328 5328 } 5329 5329 5330 - if len(t.Allow) > cbg.MaxLength { 5330 + if uint64(len(t.Allow)) > cbg.MaxLength { 5331 5331 return xerrors.Errorf("Slice value in field t.Allow was too long") 5332 5332 } 5333 5333 ··· 5343 5343 } 5344 5344 5345 5345 // t.CreatedAt (string) (string) 5346 - if len("createdAt") > cbg.MaxLength { 5346 + if uint64(len("createdAt")) > cbg.MaxLength { 5347 5347 return xerrors.Errorf("Value in field \"createdAt\" was too long") 5348 5348 } 5349 5349 ··· 5354 5354 return err 5355 5355 } 5356 5356 5357 - if len(t.CreatedAt) > cbg.MaxLength { 5357 + if uint64(len(t.CreatedAt)) > cbg.MaxLength { 5358 5358 return xerrors.Errorf("Value in field t.CreatedAt was too long") 5359 5359 } 5360 5360 ··· 5509 5509 } 5510 5510 5511 5511 // t.List (string) (string) 5512 - if len("list") > cbg.MaxLength { 5512 + if uint64(len("list")) > cbg.MaxLength { 5513 5513 return xerrors.Errorf("Value in field \"list\" was too long") 5514 5514 } 5515 5515 ··· 5520 5520 return err 5521 5521 } 5522 5522 5523 - if len(t.List) > cbg.MaxLength { 5523 + if uint64(len(t.List)) > cbg.MaxLength { 5524 5524 return xerrors.Errorf("Value in field t.List was too long") 5525 5525 } 5526 5526 ··· 5532 5532 } 5533 5533 5534 5534 // t.LexiconTypeID (string) (string) 5535 - if len("$type") > cbg.MaxLength { 5535 + if uint64(len("$type")) > cbg.MaxLength { 5536 5536 return xerrors.Errorf("Value in field \"$type\" was too long") 5537 5537 } 5538 5538 ··· 5634 5634 } 5635 5635 5636 5636 // t.LexiconTypeID (string) (string) 5637 - if len("$type") > cbg.MaxLength { 5637 + if uint64(len("$type")) > cbg.MaxLength { 5638 5638 return xerrors.Errorf("Value in field \"$type\" was too long") 5639 5639 } 5640 5640 ··· 5725 5725 } 5726 5726 5727 5727 // t.LexiconTypeID (string) (string) 5728 - if len("$type") > cbg.MaxLength { 5728 + if uint64(len("$type")) > cbg.MaxLength { 5729 5729 return xerrors.Errorf("Value in field \"$type\" was too long") 5730 5730 } 5731 5731
+7
api/bsky/init.go
··· 1 + package bsky 2 + 3 + import cbg "github.com/whyrusleeping/cbor-gen" 4 + 5 + func init() { 6 + cbg.MaxLength = 1000000 7 + }
+14 -14
api/cbor_gen.go
··· 38 38 // t.Sig (string) (string) 39 39 if t.Sig != "" { 40 40 41 - if len("sig") > cbg.MaxLength { 41 + if uint64(len("sig")) > cbg.MaxLength { 42 42 return xerrors.Errorf("Value in field \"sig\" was too long") 43 43 } 44 44 ··· 49 49 return err 50 50 } 51 51 52 - if len(t.Sig) > cbg.MaxLength { 52 + if uint64(len(t.Sig)) > cbg.MaxLength { 53 53 return xerrors.Errorf("Value in field t.Sig was too long") 54 54 } 55 55 ··· 62 62 } 63 63 64 64 // t.Prev (string) (string) 65 - if len("prev") > cbg.MaxLength { 65 + if uint64(len("prev")) > cbg.MaxLength { 66 66 return xerrors.Errorf("Value in field \"prev\" was too long") 67 67 } 68 68 ··· 78 78 return err 79 79 } 80 80 } else { 81 - if len(*t.Prev) > cbg.MaxLength { 81 + if uint64(len(*t.Prev)) > cbg.MaxLength { 82 82 return xerrors.Errorf("Value in field t.Prev was too long") 83 83 } 84 84 ··· 91 91 } 92 92 93 93 // t.Type (string) (string) 94 - if len("type") > cbg.MaxLength { 94 + if uint64(len("type")) > cbg.MaxLength { 95 95 return xerrors.Errorf("Value in field \"type\" was too long") 96 96 } 97 97 ··· 102 102 return err 103 103 } 104 104 105 - if len(t.Type) > cbg.MaxLength { 105 + if uint64(len(t.Type)) > cbg.MaxLength { 106 106 return xerrors.Errorf("Value in field t.Type was too long") 107 107 } 108 108 ··· 114 114 } 115 115 116 116 // t.Handle (string) (string) 117 - if len("handle") > cbg.MaxLength { 117 + if uint64(len("handle")) > cbg.MaxLength { 118 118 return xerrors.Errorf("Value in field \"handle\" was too long") 119 119 } 120 120 ··· 125 125 return err 126 126 } 127 127 128 - if len(t.Handle) > cbg.MaxLength { 128 + if uint64(len(t.Handle)) > cbg.MaxLength { 129 129 return xerrors.Errorf("Value in field t.Handle was too long") 130 130 } 131 131 ··· 137 137 } 138 138 139 139 // t.Service (string) (string) 140 - if len("service") > cbg.MaxLength { 140 + if uint64(len("service")) > cbg.MaxLength { 141 141 return xerrors.Errorf("Value in field \"service\" was too long") 142 142 } 143 143 ··· 148 148 return err 149 149 } 150 150 151 - if len(t.Service) > cbg.MaxLength { 151 + if uint64(len(t.Service)) > cbg.MaxLength { 152 152 return xerrors.Errorf("Value in field t.Service was too long") 153 153 } 154 154 ··· 160 160 } 161 161 162 162 // t.SigningKey (string) (string) 163 - if len("signingKey") > cbg.MaxLength { 163 + if uint64(len("signingKey")) > cbg.MaxLength { 164 164 return xerrors.Errorf("Value in field \"signingKey\" was too long") 165 165 } 166 166 ··· 171 171 return err 172 172 } 173 173 174 - if len(t.SigningKey) > cbg.MaxLength { 174 + if uint64(len(t.SigningKey)) > cbg.MaxLength { 175 175 return xerrors.Errorf("Value in field t.SigningKey was too long") 176 176 } 177 177 ··· 183 183 } 184 184 185 185 // t.RecoveryKey (string) (string) 186 - if len("recoveryKey") > cbg.MaxLength { 186 + if uint64(len("recoveryKey")) > cbg.MaxLength { 187 187 return xerrors.Errorf("Value in field \"recoveryKey\" was too long") 188 188 } 189 189 ··· 194 194 return err 195 195 } 196 196 197 - if len(t.RecoveryKey) > cbg.MaxLength { 197 + if uint64(len(t.RecoveryKey)) > cbg.MaxLength { 198 198 return xerrors.Errorf("Value in field t.RecoveryKey was too long") 199 199 } 200 200
+11 -11
atproto/data/cbor_gen.go
··· 31 31 } 32 32 33 33 // t.Type (string) (string) 34 - if len("$type") > cbg.MaxLength { 34 + if uint64(len("$type")) > cbg.MaxLength { 35 35 return xerrors.Errorf("Value in field \"$type\" was too long") 36 36 } 37 37 ··· 42 42 return err 43 43 } 44 44 45 - if len(t.Type) > cbg.MaxLength { 45 + if uint64(len(t.Type)) > cbg.MaxLength { 46 46 return xerrors.Errorf("Value in field t.Type was too long") 47 47 } 48 48 ··· 126 126 } 127 127 128 128 // t.Cid (string) (string) 129 - if len("cid") > cbg.MaxLength { 129 + if uint64(len("cid")) > cbg.MaxLength { 130 130 return xerrors.Errorf("Value in field \"cid\" was too long") 131 131 } 132 132 ··· 137 137 return err 138 138 } 139 139 140 - if len(t.Cid) > cbg.MaxLength { 140 + if uint64(len(t.Cid)) > cbg.MaxLength { 141 141 return xerrors.Errorf("Value in field t.Cid was too long") 142 142 } 143 143 ··· 149 149 } 150 150 151 151 // t.MimeType (string) (string) 152 - if len("mimeType") > cbg.MaxLength { 152 + if uint64(len("mimeType")) > cbg.MaxLength { 153 153 return xerrors.Errorf("Value in field \"mimeType\" was too long") 154 154 } 155 155 ··· 160 160 return err 161 161 } 162 162 163 - if len(t.MimeType) > cbg.MaxLength { 163 + if uint64(len(t.MimeType)) > cbg.MaxLength { 164 164 return xerrors.Errorf("Value in field t.MimeType was too long") 165 165 } 166 166 ··· 255 255 } 256 256 257 257 // t.Ref (data.CIDLink) (struct) 258 - if len("ref") > cbg.MaxLength { 258 + if uint64(len("ref")) > cbg.MaxLength { 259 259 return xerrors.Errorf("Value in field \"ref\" was too long") 260 260 } 261 261 ··· 271 271 } 272 272 273 273 // t.Size (int64) (int64) 274 - if len("size") > cbg.MaxLength { 274 + if uint64(len("size")) > cbg.MaxLength { 275 275 return xerrors.Errorf("Value in field \"size\" was too long") 276 276 } 277 277 ··· 293 293 } 294 294 295 295 // t.LexiconTypeID (string) (string) 296 - if len("$type") > cbg.MaxLength { 296 + if uint64(len("$type")) > cbg.MaxLength { 297 297 return xerrors.Errorf("Value in field \"$type\" was too long") 298 298 } 299 299 ··· 312 312 } 313 313 314 314 // t.MimeType (string) (string) 315 - if len("mimeType") > cbg.MaxLength { 315 + if uint64(len("mimeType")) > cbg.MaxLength { 316 316 return xerrors.Errorf("Value in field \"mimeType\" was too long") 317 317 } 318 318 ··· 323 323 return err 324 324 } 325 325 326 - if len(t.MimeType) > cbg.MaxLength { 326 + if uint64(len(t.MimeType)) > cbg.MaxLength { 327 327 return xerrors.Errorf("Value in field t.MimeType was too long") 328 328 } 329 329
+7 -7
events/cbor_gen.go
··· 31 31 } 32 32 33 33 // t.MsgType (string) (string) 34 - if len("t") > cbg.MaxLength { 34 + if uint64(len("t")) > cbg.MaxLength { 35 35 return xerrors.Errorf("Value in field \"t\" was too long") 36 36 } 37 37 ··· 42 42 return err 43 43 } 44 44 45 - if len(t.MsgType) > cbg.MaxLength { 45 + if uint64(len(t.MsgType)) > cbg.MaxLength { 46 46 return xerrors.Errorf("Value in field t.MsgType was too long") 47 47 } 48 48 ··· 54 54 } 55 55 56 56 // t.Op (int64) (int64) 57 - if len("op") > cbg.MaxLength { 57 + if uint64(len("op")) > cbg.MaxLength { 58 58 return xerrors.Errorf("Value in field \"op\" was too long") 59 59 } 60 60 ··· 174 174 } 175 175 176 176 // t.Error (string) (string) 177 - if len("error") > cbg.MaxLength { 177 + if uint64(len("error")) > cbg.MaxLength { 178 178 return xerrors.Errorf("Value in field \"error\" was too long") 179 179 } 180 180 ··· 185 185 return err 186 186 } 187 187 188 - if len(t.Error) > cbg.MaxLength { 188 + if uint64(len(t.Error)) > cbg.MaxLength { 189 189 return xerrors.Errorf("Value in field t.Error was too long") 190 190 } 191 191 ··· 197 197 } 198 198 199 199 // t.Message (string) (string) 200 - if len("message") > cbg.MaxLength { 200 + if uint64(len("message")) > cbg.MaxLength { 201 201 return xerrors.Errorf("Value in field \"message\" was too long") 202 202 } 203 203 ··· 208 208 return err 209 209 } 210 210 211 - if len(t.Message) > cbg.MaxLength { 211 + if uint64(len(t.Message)) > cbg.MaxLength { 212 212 return xerrors.Errorf("Value in field t.Message was too long") 213 213 } 214 214
+1 -1
go.mod
··· 52 52 github.com/scylladb/gocqlx/v2 v2.8.1-0.20230309105046-dec046bd85e6 53 53 github.com/stretchr/testify v1.8.4 54 54 github.com/urfave/cli/v2 v2.25.7 55 - github.com/whyrusleeping/cbor-gen v0.0.0-20240104201801-075d1573fac9 55 + github.com/whyrusleeping/cbor-gen v0.0.0-20240201211319-bf2168ca937c 56 56 github.com/whyrusleeping/go-did v0.0.0-20230824162731-404d1707d5d6 57 57 gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b 58 58 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1
+2
go.sum
··· 636 636 github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11/go.mod h1:Wlo/SzPmxVp6vXpGt/zaXhHH0fn4IxgqZc82aKg6bpQ= 637 637 github.com/whyrusleeping/cbor-gen v0.0.0-20240104201801-075d1573fac9 h1:973JQTSOMo66VlNZ2+tMQYruE0Yny9DrKvIkr/ybRJg= 638 638 github.com/whyrusleeping/cbor-gen v0.0.0-20240104201801-075d1573fac9/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= 639 + github.com/whyrusleeping/cbor-gen v0.0.0-20240201211319-bf2168ca937c h1:QNbN8SzRc40MGwnd2op/l3E32M445kVJqvgt7NagF4c= 640 + github.com/whyrusleeping/cbor-gen v0.0.0-20240201211319-bf2168ca937c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= 639 641 github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E= 640 642 github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= 641 643 github.com/whyrusleeping/go-did v0.0.0-20230824162731-404d1707d5d6 h1:yJ9/LwIGIk/c0CdoavpC9RNSGSruIspSZtxG3Nnldic=
+11 -11
lex/util/cbor_gen.go
··· 31 31 } 32 32 33 33 // t.Type (string) (string) 34 - if len("$type") > cbg.MaxLength { 34 + if uint64(len("$type")) > cbg.MaxLength { 35 35 return xerrors.Errorf("Value in field \"$type\" was too long") 36 36 } 37 37 ··· 42 42 return err 43 43 } 44 44 45 - if len(t.Type) > cbg.MaxLength { 45 + if uint64(len(t.Type)) > cbg.MaxLength { 46 46 return xerrors.Errorf("Value in field t.Type was too long") 47 47 } 48 48 ··· 126 126 } 127 127 128 128 // t.Cid (string) (string) 129 - if len("cid") > cbg.MaxLength { 129 + if uint64(len("cid")) > cbg.MaxLength { 130 130 return xerrors.Errorf("Value in field \"cid\" was too long") 131 131 } 132 132 ··· 137 137 return err 138 138 } 139 139 140 - if len(t.Cid) > cbg.MaxLength { 140 + if uint64(len(t.Cid)) > cbg.MaxLength { 141 141 return xerrors.Errorf("Value in field t.Cid was too long") 142 142 } 143 143 ··· 149 149 } 150 150 151 151 // t.MimeType (string) (string) 152 - if len("mimeType") > cbg.MaxLength { 152 + if uint64(len("mimeType")) > cbg.MaxLength { 153 153 return xerrors.Errorf("Value in field \"mimeType\" was too long") 154 154 } 155 155 ··· 160 160 return err 161 161 } 162 162 163 - if len(t.MimeType) > cbg.MaxLength { 163 + if uint64(len(t.MimeType)) > cbg.MaxLength { 164 164 return xerrors.Errorf("Value in field t.MimeType was too long") 165 165 } 166 166 ··· 255 255 } 256 256 257 257 // t.Ref (util.LexLink) (struct) 258 - if len("ref") > cbg.MaxLength { 258 + if uint64(len("ref")) > cbg.MaxLength { 259 259 return xerrors.Errorf("Value in field \"ref\" was too long") 260 260 } 261 261 ··· 271 271 } 272 272 273 273 // t.Size (int64) (int64) 274 - if len("size") > cbg.MaxLength { 274 + if uint64(len("size")) > cbg.MaxLength { 275 275 return xerrors.Errorf("Value in field \"size\" was too long") 276 276 } 277 277 ··· 293 293 } 294 294 295 295 // t.LexiconTypeID (string) (string) 296 - if len("$type") > cbg.MaxLength { 296 + if uint64(len("$type")) > cbg.MaxLength { 297 297 return xerrors.Errorf("Value in field \"$type\" was too long") 298 298 } 299 299 ··· 312 312 } 313 313 314 314 // t.MimeType (string) (string) 315 - if len("mimeType") > cbg.MaxLength { 315 + if uint64(len("mimeType")) > cbg.MaxLength { 316 316 return xerrors.Errorf("Value in field \"mimeType\" was too long") 317 317 } 318 318 ··· 323 323 return err 324 324 } 325 325 326 - if len(t.MimeType) > cbg.MaxLength { 326 + if uint64(len(t.MimeType)) > cbg.MaxLength { 327 327 return xerrors.Errorf("Value in field t.MimeType was too long") 328 328 } 329 329
+51 -51
lex/util/cbor_gen_test.go
··· 36 36 } 37 37 38 38 // t.Bool (bool) (bool) 39 - if len("bool") > cbg.MaxLength { 39 + if uint64(len("bool")) > cbg.MaxLength { 40 40 return xerrors.Errorf("Value in field \"bool\" was too long") 41 41 } 42 42 ··· 52 52 } 53 53 54 54 // t.Null (string) (string) 55 - if len("null") > cbg.MaxLength { 55 + if uint64(len("null")) > cbg.MaxLength { 56 56 return xerrors.Errorf("Value in field \"null\" was too long") 57 57 } 58 58 ··· 68 68 return err 69 69 } 70 70 } else { 71 - if len(*t.Null) > cbg.MaxLength { 71 + if uint64(len(*t.Null)) > cbg.MaxLength { 72 72 return xerrors.Errorf("Value in field t.Null was too long") 73 73 } 74 74 ··· 81 81 } 82 82 83 83 // t.Array ([]string) (slice) 84 - if len("array") > cbg.MaxLength { 84 + if uint64(len("array")) > cbg.MaxLength { 85 85 return xerrors.Errorf("Value in field \"array\" was too long") 86 86 } 87 87 ··· 92 92 return err 93 93 } 94 94 95 - if len(t.Array) > cbg.MaxLength { 95 + if uint64(len(t.Array)) > cbg.MaxLength { 96 96 return xerrors.Errorf("Slice value in field t.Array was too long") 97 97 } 98 98 ··· 100 100 return err 101 101 } 102 102 for _, v := range t.Array { 103 - if len(v) > cbg.MaxLength { 103 + if uint64(len(v)) > cbg.MaxLength { 104 104 return xerrors.Errorf("Value in field v was too long") 105 105 } 106 106 ··· 116 116 // t.Absent (string) (string) 117 117 if t.Absent != nil { 118 118 119 - if len("absent") > cbg.MaxLength { 119 + if uint64(len("absent")) > cbg.MaxLength { 120 120 return xerrors.Errorf("Value in field \"absent\" was too long") 121 121 } 122 122 ··· 132 132 return err 133 133 } 134 134 } else { 135 - if len(*t.Absent) > cbg.MaxLength { 135 + if uint64(len(*t.Absent)) > cbg.MaxLength { 136 136 return xerrors.Errorf("Value in field t.Absent was too long") 137 137 } 138 138 ··· 146 146 } 147 147 148 148 // t.Object (util.basicSchemaInner) (struct) 149 - if len("object") > cbg.MaxLength { 149 + if uint64(len("object")) > cbg.MaxLength { 150 150 return xerrors.Errorf("Value in field \"object\" was too long") 151 151 } 152 152 ··· 162 162 } 163 163 164 164 // t.String (string) (string) 165 - if len("string") > cbg.MaxLength { 165 + if uint64(len("string")) > cbg.MaxLength { 166 166 return xerrors.Errorf("Value in field \"string\" was too long") 167 167 } 168 168 ··· 173 173 return err 174 174 } 175 175 176 - if len(t.String) > cbg.MaxLength { 176 + if uint64(len(t.String)) > cbg.MaxLength { 177 177 return xerrors.Errorf("Value in field t.String was too long") 178 178 } 179 179 ··· 185 185 } 186 186 187 187 // t.Integer (int64) (int64) 188 - if len("integer") > cbg.MaxLength { 188 + if uint64(len("integer")) > cbg.MaxLength { 189 189 return xerrors.Errorf("Value in field \"integer\" was too long") 190 190 } 191 191 ··· 207 207 } 208 208 209 209 // t.Unicode (string) (string) 210 - if len("unicode") > cbg.MaxLength { 210 + if uint64(len("unicode")) > cbg.MaxLength { 211 211 return xerrors.Errorf("Value in field \"unicode\" was too long") 212 212 } 213 213 ··· 218 218 return err 219 219 } 220 220 221 - if len(t.Unicode) > cbg.MaxLength { 221 + if uint64(len(t.Unicode)) > cbg.MaxLength { 222 222 return xerrors.Errorf("Value in field t.Unicode was too long") 223 223 } 224 224 ··· 449 449 } 450 450 451 451 // t.Arr ([]string) (slice) 452 - if len("arr") > cbg.MaxLength { 452 + if uint64(len("arr")) > cbg.MaxLength { 453 453 return xerrors.Errorf("Value in field \"arr\" was too long") 454 454 } 455 455 ··· 460 460 return err 461 461 } 462 462 463 - if len(t.Arr) > cbg.MaxLength { 463 + if uint64(len(t.Arr)) > cbg.MaxLength { 464 464 return xerrors.Errorf("Slice value in field t.Arr was too long") 465 465 } 466 466 ··· 468 468 return err 469 469 } 470 470 for _, v := range t.Arr { 471 - if len(v) > cbg.MaxLength { 471 + if uint64(len(v)) > cbg.MaxLength { 472 472 return xerrors.Errorf("Value in field v was too long") 473 473 } 474 474 ··· 482 482 } 483 483 484 484 // t.Bool (bool) (bool) 485 - if len("bool") > cbg.MaxLength { 485 + if uint64(len("bool")) > cbg.MaxLength { 486 486 return xerrors.Errorf("Value in field \"bool\" was too long") 487 487 } 488 488 ··· 498 498 } 499 499 500 500 // t.Number (int64) (int64) 501 - if len("number") > cbg.MaxLength { 501 + if uint64(len("number")) > cbg.MaxLength { 502 502 return xerrors.Errorf("Value in field \"number\" was too long") 503 503 } 504 504 ··· 520 520 } 521 521 522 522 // t.String (string) (string) 523 - if len("string") > cbg.MaxLength { 523 + if uint64(len("string")) > cbg.MaxLength { 524 524 return xerrors.Errorf("Value in field \"string\" was too long") 525 525 } 526 526 ··· 531 531 return err 532 532 } 533 533 534 - if len(t.String) > cbg.MaxLength { 534 + if uint64(len(t.String)) > cbg.MaxLength { 535 535 return xerrors.Errorf("Value in field t.String was too long") 536 536 } 537 537 ··· 699 699 } 700 700 701 701 // t.A (util.LexLink) (struct) 702 - if len("a") > cbg.MaxLength { 702 + if uint64(len("a")) > cbg.MaxLength { 703 703 return xerrors.Errorf("Value in field \"a\" was too long") 704 704 } 705 705 ··· 715 715 } 716 716 717 717 // t.B (util.LexBytes) (slice) 718 - if len("b") > cbg.MaxLength { 718 + if uint64(len("b")) > cbg.MaxLength { 719 719 return xerrors.Errorf("Value in field \"b\" was too long") 720 720 } 721 721 ··· 726 726 return err 727 727 } 728 728 729 - if len(t.B) > cbg.ByteArrayMaxLen { 729 + if uint64(len(t.B)) > cbg.ByteArrayMaxLen { 730 730 return xerrors.Errorf("Byte array in field t.B was too long") 731 731 } 732 732 ··· 734 734 return err 735 735 } 736 736 737 - if _, err := cw.Write(t.B[:]); err != nil { 737 + if _, err := cw.Write(t.B); err != nil { 738 738 return err 739 739 } 740 740 741 741 // t.C (util.LexBlob) (struct) 742 - if len("c") > cbg.MaxLength { 742 + if uint64(len("c")) > cbg.MaxLength { 743 743 return xerrors.Errorf("Value in field \"c\" was too long") 744 744 } 745 745 ··· 823 823 t.B = make([]uint8, extra) 824 824 } 825 825 826 - if _, err := io.ReadFull(cr, t.B[:]); err != nil { 826 + if _, err := io.ReadFull(cr, t.B); err != nil { 827 827 return err 828 828 } 829 829 ··· 864 864 } 865 865 866 866 // t.A (string) (string) 867 - if len("a") > cbg.MaxLength { 867 + if uint64(len("a")) > cbg.MaxLength { 868 868 return xerrors.Errorf("Value in field \"a\" was too long") 869 869 } 870 870 ··· 875 875 return err 876 876 } 877 877 878 - if len(t.A) > cbg.MaxLength { 878 + if uint64(len(t.A)) > cbg.MaxLength { 879 879 return xerrors.Errorf("Value in field t.A was too long") 880 880 } 881 881 ··· 887 887 } 888 888 889 889 // t.B (int64) (int64) 890 - if len("b") > cbg.MaxLength { 890 + if uint64(len("b")) > cbg.MaxLength { 891 891 return xerrors.Errorf("Value in field \"b\" was too long") 892 892 } 893 893 ··· 909 909 } 910 910 911 911 // t.C (bool) (bool) 912 - if len("c") > cbg.MaxLength { 912 + if uint64(len("c")) > cbg.MaxLength { 913 913 return xerrors.Errorf("Value in field \"c\" was too long") 914 914 } 915 915 ··· 927 927 // t.D (string) (string) 928 928 if t.D != nil { 929 929 930 - if len("d") > cbg.MaxLength { 930 + if uint64(len("d")) > cbg.MaxLength { 931 931 return xerrors.Errorf("Value in field \"d\" was too long") 932 932 } 933 933 ··· 943 943 return err 944 944 } 945 945 } else { 946 - if len(*t.D) > cbg.MaxLength { 946 + if uint64(len(*t.D)) > cbg.MaxLength { 947 947 return xerrors.Errorf("Value in field t.D was too long") 948 948 } 949 949 ··· 957 957 } 958 958 959 959 // t.E (string) (string) 960 - if len("e") > cbg.MaxLength { 960 + if uint64(len("e")) > cbg.MaxLength { 961 961 return xerrors.Errorf("Value in field \"e\" was too long") 962 962 } 963 963 ··· 973 973 return err 974 974 } 975 975 } else { 976 - if len(*t.E) > cbg.MaxLength { 976 + if uint64(len(*t.E)) > cbg.MaxLength { 977 977 return xerrors.Errorf("Value in field t.E was too long") 978 978 } 979 979 ··· 986 986 } 987 987 988 988 // t.F ([]string) (slice) 989 - if len("f") > cbg.MaxLength { 989 + if uint64(len("f")) > cbg.MaxLength { 990 990 return xerrors.Errorf("Value in field \"f\" was too long") 991 991 } 992 992 ··· 997 997 return err 998 998 } 999 999 1000 - if len(t.F) > cbg.MaxLength { 1000 + if uint64(len(t.F)) > cbg.MaxLength { 1001 1001 return xerrors.Errorf("Slice value in field t.F was too long") 1002 1002 } 1003 1003 ··· 1005 1005 return err 1006 1006 } 1007 1007 for _, v := range t.F { 1008 - if len(v) > cbg.MaxLength { 1008 + if uint64(len(v)) > cbg.MaxLength { 1009 1009 return xerrors.Errorf("Value in field v was too long") 1010 1010 } 1011 1011 ··· 1019 1019 } 1020 1020 1021 1021 // t.G (util.basicOldSchemaInner) (struct) 1022 - if len("g") > cbg.MaxLength { 1022 + if uint64(len("g")) > cbg.MaxLength { 1023 1023 return xerrors.Errorf("Value in field \"g\" was too long") 1024 1024 } 1025 1025 ··· 1243 1243 } 1244 1244 1245 1245 // t.H (string) (string) 1246 - if len("h") > cbg.MaxLength { 1246 + if uint64(len("h")) > cbg.MaxLength { 1247 1247 return xerrors.Errorf("Value in field \"h\" was too long") 1248 1248 } 1249 1249 ··· 1254 1254 return err 1255 1255 } 1256 1256 1257 - if len(t.H) > cbg.MaxLength { 1257 + if uint64(len(t.H)) > cbg.MaxLength { 1258 1258 return xerrors.Errorf("Value in field t.H was too long") 1259 1259 } 1260 1260 ··· 1266 1266 } 1267 1267 1268 1268 // t.I (int64) (int64) 1269 - if len("i") > cbg.MaxLength { 1269 + if uint64(len("i")) > cbg.MaxLength { 1270 1270 return xerrors.Errorf("Value in field \"i\" was too long") 1271 1271 } 1272 1272 ··· 1288 1288 } 1289 1289 1290 1290 // t.J (bool) (bool) 1291 - if len("j") > cbg.MaxLength { 1291 + if uint64(len("j")) > cbg.MaxLength { 1292 1292 return xerrors.Errorf("Value in field \"j\" was too long") 1293 1293 } 1294 1294 ··· 1304 1304 } 1305 1305 1306 1306 // t.K ([]string) (slice) 1307 - if len("k") > cbg.MaxLength { 1307 + if uint64(len("k")) > cbg.MaxLength { 1308 1308 return xerrors.Errorf("Value in field \"k\" was too long") 1309 1309 } 1310 1310 ··· 1315 1315 return err 1316 1316 } 1317 1317 1318 - if len(t.K) > cbg.MaxLength { 1318 + if uint64(len(t.K)) > cbg.MaxLength { 1319 1319 return xerrors.Errorf("Slice value in field t.K was too long") 1320 1320 } 1321 1321 ··· 1323 1323 return err 1324 1324 } 1325 1325 for _, v := range t.K { 1326 - if len(v) > cbg.MaxLength { 1326 + if uint64(len(v)) > cbg.MaxLength { 1327 1327 return xerrors.Errorf("Value in field v was too long") 1328 1328 } 1329 1329 ··· 1493 1493 } 1494 1494 1495 1495 // t.A (util.LexLink) (struct) 1496 - if len("a") > cbg.MaxLength { 1496 + if uint64(len("a")) > cbg.MaxLength { 1497 1497 return xerrors.Errorf("Value in field \"a\" was too long") 1498 1498 } 1499 1499 ··· 1509 1509 } 1510 1510 1511 1511 // t.B (util.LexBytes) (slice) 1512 - if len("b") > cbg.MaxLength { 1512 + if uint64(len("b")) > cbg.MaxLength { 1513 1513 return xerrors.Errorf("Value in field \"b\" was too long") 1514 1514 } 1515 1515 ··· 1520 1520 return err 1521 1521 } 1522 1522 1523 - if len(t.B) > cbg.ByteArrayMaxLen { 1523 + if uint64(len(t.B)) > cbg.ByteArrayMaxLen { 1524 1524 return xerrors.Errorf("Byte array in field t.B was too long") 1525 1525 } 1526 1526 ··· 1528 1528 return err 1529 1529 } 1530 1530 1531 - if _, err := cw.Write(t.B[:]); err != nil { 1531 + if _, err := cw.Write(t.B); err != nil { 1532 1532 return err 1533 1533 } 1534 1534 ··· 1602 1602 t.B = make([]uint8, extra) 1603 1603 } 1604 1604 1605 - if _, err := io.ReadFull(cr, t.B[:]); err != nil { 1605 + if _, err := io.ReadFull(cr, t.B); err != nil { 1606 1606 return err 1607 1607 } 1608 1608
+10 -10
mst/cbor_gen.go
··· 31 31 } 32 32 33 33 // t.Entries ([]mst.treeEntry) (slice) 34 - if len("e") > cbg.MaxLength { 34 + if uint64(len("e")) > cbg.MaxLength { 35 35 return xerrors.Errorf("Value in field \"e\" was too long") 36 36 } 37 37 ··· 42 42 return err 43 43 } 44 44 45 - if len(t.Entries) > cbg.MaxLength { 45 + if uint64(len(t.Entries)) > cbg.MaxLength { 46 46 return xerrors.Errorf("Slice value in field t.Entries was too long") 47 47 } 48 48 ··· 57 57 } 58 58 59 59 // t.Left (cid.Cid) (struct) 60 - if len("l") > cbg.MaxLength { 60 + if uint64(len("l")) > cbg.MaxLength { 61 61 return xerrors.Errorf("Value in field \"l\" was too long") 62 62 } 63 63 ··· 203 203 } 204 204 205 205 // t.KeySuffix ([]uint8) (slice) 206 - if len("k") > cbg.MaxLength { 206 + if uint64(len("k")) > cbg.MaxLength { 207 207 return xerrors.Errorf("Value in field \"k\" was too long") 208 208 } 209 209 ··· 214 214 return err 215 215 } 216 216 217 - if len(t.KeySuffix) > cbg.ByteArrayMaxLen { 217 + if uint64(len(t.KeySuffix)) > cbg.ByteArrayMaxLen { 218 218 return xerrors.Errorf("Byte array in field t.KeySuffix was too long") 219 219 } 220 220 ··· 222 222 return err 223 223 } 224 224 225 - if _, err := cw.Write(t.KeySuffix[:]); err != nil { 225 + if _, err := cw.Write(t.KeySuffix); err != nil { 226 226 return err 227 227 } 228 228 229 229 // t.PrefixLen (int64) (int64) 230 - if len("p") > cbg.MaxLength { 230 + if uint64(len("p")) > cbg.MaxLength { 231 231 return xerrors.Errorf("Value in field \"p\" was too long") 232 232 } 233 233 ··· 249 249 } 250 250 251 251 // t.Tree (cid.Cid) (struct) 252 - if len("t") > cbg.MaxLength { 252 + if uint64(len("t")) > cbg.MaxLength { 253 253 return xerrors.Errorf("Value in field \"t\" was too long") 254 254 } 255 255 ··· 271 271 } 272 272 273 273 // t.Val (cid.Cid) (struct) 274 - if len("v") > cbg.MaxLength { 274 + if uint64(len("v")) > cbg.MaxLength { 275 275 return xerrors.Errorf("Value in field \"v\" was too long") 276 276 } 277 277 ··· 346 346 t.KeySuffix = make([]uint8, extra) 347 347 } 348 348 349 - if _, err := io.ReadFull(cr, t.KeySuffix[:]); err != nil { 349 + if _, err := io.ReadFull(cr, t.KeySuffix); err != nil { 350 350 return err 351 351 } 352 352
+18 -18
repo/cbor_gen.go
··· 36 36 } 37 37 38 38 // t.Did (string) (string) 39 - if len("did") > cbg.MaxLength { 39 + if uint64(len("did")) > cbg.MaxLength { 40 40 return xerrors.Errorf("Value in field \"did\" was too long") 41 41 } 42 42 ··· 47 47 return err 48 48 } 49 49 50 - if len(t.Did) > cbg.MaxLength { 50 + if uint64(len(t.Did)) > cbg.MaxLength { 51 51 return xerrors.Errorf("Value in field t.Did was too long") 52 52 } 53 53 ··· 61 61 // t.Rev (string) (string) 62 62 if t.Rev != "" { 63 63 64 - if len("rev") > cbg.MaxLength { 64 + if uint64(len("rev")) > cbg.MaxLength { 65 65 return xerrors.Errorf("Value in field \"rev\" was too long") 66 66 } 67 67 ··· 72 72 return err 73 73 } 74 74 75 - if len(t.Rev) > cbg.MaxLength { 75 + if uint64(len(t.Rev)) > cbg.MaxLength { 76 76 return xerrors.Errorf("Value in field t.Rev was too long") 77 77 } 78 78 ··· 85 85 } 86 86 87 87 // t.Sig ([]uint8) (slice) 88 - if len("sig") > cbg.MaxLength { 88 + if uint64(len("sig")) > cbg.MaxLength { 89 89 return xerrors.Errorf("Value in field \"sig\" was too long") 90 90 } 91 91 ··· 96 96 return err 97 97 } 98 98 99 - if len(t.Sig) > cbg.ByteArrayMaxLen { 99 + if uint64(len(t.Sig)) > cbg.ByteArrayMaxLen { 100 100 return xerrors.Errorf("Byte array in field t.Sig was too long") 101 101 } 102 102 ··· 104 104 return err 105 105 } 106 106 107 - if _, err := cw.Write(t.Sig[:]); err != nil { 107 + if _, err := cw.Write(t.Sig); err != nil { 108 108 return err 109 109 } 110 110 111 111 // t.Data (cid.Cid) (struct) 112 - if len("data") > cbg.MaxLength { 112 + if uint64(len("data")) > cbg.MaxLength { 113 113 return xerrors.Errorf("Value in field \"data\" was too long") 114 114 } 115 115 ··· 125 125 } 126 126 127 127 // t.Prev (cid.Cid) (struct) 128 - if len("prev") > cbg.MaxLength { 128 + if uint64(len("prev")) > cbg.MaxLength { 129 129 return xerrors.Errorf("Value in field \"prev\" was too long") 130 130 } 131 131 ··· 147 147 } 148 148 149 149 // t.Version (int64) (int64) 150 - if len("version") > cbg.MaxLength { 150 + if uint64(len("version")) > cbg.MaxLength { 151 151 return xerrors.Errorf("Value in field \"version\" was too long") 152 152 } 153 153 ··· 249 249 t.Sig = make([]uint8, extra) 250 250 } 251 251 252 - if _, err := io.ReadFull(cr, t.Sig[:]); err != nil { 252 + if _, err := io.ReadFull(cr, t.Sig); err != nil { 253 253 return err 254 254 } 255 255 ··· 342 342 } 343 343 344 344 // t.Did (string) (string) 345 - if len("did") > cbg.MaxLength { 345 + if uint64(len("did")) > cbg.MaxLength { 346 346 return xerrors.Errorf("Value in field \"did\" was too long") 347 347 } 348 348 ··· 353 353 return err 354 354 } 355 355 356 - if len(t.Did) > cbg.MaxLength { 356 + if uint64(len(t.Did)) > cbg.MaxLength { 357 357 return xerrors.Errorf("Value in field t.Did was too long") 358 358 } 359 359 ··· 367 367 // t.Rev (string) (string) 368 368 if t.Rev != "" { 369 369 370 - if len("rev") > cbg.MaxLength { 370 + if uint64(len("rev")) > cbg.MaxLength { 371 371 return xerrors.Errorf("Value in field \"rev\" was too long") 372 372 } 373 373 ··· 378 378 return err 379 379 } 380 380 381 - if len(t.Rev) > cbg.MaxLength { 381 + if uint64(len(t.Rev)) > cbg.MaxLength { 382 382 return xerrors.Errorf("Value in field t.Rev was too long") 383 383 } 384 384 ··· 391 391 } 392 392 393 393 // t.Data (cid.Cid) (struct) 394 - if len("data") > cbg.MaxLength { 394 + if uint64(len("data")) > cbg.MaxLength { 395 395 return xerrors.Errorf("Value in field \"data\" was too long") 396 396 } 397 397 ··· 407 407 } 408 408 409 409 // t.Prev (cid.Cid) (struct) 410 - if len("prev") > cbg.MaxLength { 410 + if uint64(len("prev")) > cbg.MaxLength { 411 411 return xerrors.Errorf("Value in field \"prev\" was too long") 412 412 } 413 413 ··· 429 429 } 430 430 431 431 // t.Version (int64) (int64) 432 - if len("version") > cbg.MaxLength { 432 + if uint64(len("version")) > cbg.MaxLength { 433 433 return xerrors.Errorf("Value in field \"version\" was too long") 434 434 } 435 435