github.com/sandwich-go/boost@v1.3.29/xmap/walk.go (about) 1 // Code generated by tools. DO NOT EDIT. 2 package xmap 3 4 import "sort" 5 6 var _ sort.Interface 7 8 // WalkFloat32Float32MapDeterministic 有序遍历map 9 // walkFunc 函数返回 false,停止遍历 10 func WalkFloat32Float32MapDeterministic(in map[float32]float32, walkFunc func(k float32, v float32) bool) { 11 var keys = make([]float32, 0, len(in)) 12 for k := range in { 13 keys = append(keys, k) 14 } 15 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 16 for _, k := range keys { 17 if walkFunc(k, in[k]) { 18 continue 19 } 20 break 21 } 22 } 23 24 // WalkFloat32Float64MapDeterministic 有序遍历map 25 // walkFunc 函数返回 false,停止遍历 26 func WalkFloat32Float64MapDeterministic(in map[float32]float64, walkFunc func(k float32, v float64) bool) { 27 var keys = make([]float32, 0, len(in)) 28 for k := range in { 29 keys = append(keys, k) 30 } 31 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 32 for _, k := range keys { 33 if walkFunc(k, in[k]) { 34 continue 35 } 36 break 37 } 38 } 39 40 // WalkFloat32IntMapDeterministic 有序遍历map 41 // walkFunc 函数返回 false,停止遍历 42 func WalkFloat32IntMapDeterministic(in map[float32]int, walkFunc func(k float32, v int) bool) { 43 var keys = make([]float32, 0, len(in)) 44 for k := range in { 45 keys = append(keys, k) 46 } 47 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 48 for _, k := range keys { 49 if walkFunc(k, in[k]) { 50 continue 51 } 52 break 53 } 54 } 55 56 // WalkFloat32Int16MapDeterministic 有序遍历map 57 // walkFunc 函数返回 false,停止遍历 58 func WalkFloat32Int16MapDeterministic(in map[float32]int16, walkFunc func(k float32, v int16) bool) { 59 var keys = make([]float32, 0, len(in)) 60 for k := range in { 61 keys = append(keys, k) 62 } 63 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 64 for _, k := range keys { 65 if walkFunc(k, in[k]) { 66 continue 67 } 68 break 69 } 70 } 71 72 // WalkFloat32Int32MapDeterministic 有序遍历map 73 // walkFunc 函数返回 false,停止遍历 74 func WalkFloat32Int32MapDeterministic(in map[float32]int32, walkFunc func(k float32, v int32) bool) { 75 var keys = make([]float32, 0, len(in)) 76 for k := range in { 77 keys = append(keys, k) 78 } 79 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 80 for _, k := range keys { 81 if walkFunc(k, in[k]) { 82 continue 83 } 84 break 85 } 86 } 87 88 // WalkFloat32Int64MapDeterministic 有序遍历map 89 // walkFunc 函数返回 false,停止遍历 90 func WalkFloat32Int64MapDeterministic(in map[float32]int64, walkFunc func(k float32, v int64) bool) { 91 var keys = make([]float32, 0, len(in)) 92 for k := range in { 93 keys = append(keys, k) 94 } 95 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 96 for _, k := range keys { 97 if walkFunc(k, in[k]) { 98 continue 99 } 100 break 101 } 102 } 103 104 // WalkFloat32Int8MapDeterministic 有序遍历map 105 // walkFunc 函数返回 false,停止遍历 106 func WalkFloat32Int8MapDeterministic(in map[float32]int8, walkFunc func(k float32, v int8) bool) { 107 var keys = make([]float32, 0, len(in)) 108 for k := range in { 109 keys = append(keys, k) 110 } 111 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 112 for _, k := range keys { 113 if walkFunc(k, in[k]) { 114 continue 115 } 116 break 117 } 118 } 119 120 // WalkFloat32InterfaceMapDeterministic 有序遍历map 121 // walkFunc 函数返回 false,停止遍历 122 func WalkFloat32InterfaceMapDeterministic(in map[float32]interface{}, walkFunc func(k float32, v interface{}) bool) { 123 var keys = make([]float32, 0, len(in)) 124 for k := range in { 125 keys = append(keys, k) 126 } 127 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 128 for _, k := range keys { 129 if walkFunc(k, in[k]) { 130 continue 131 } 132 break 133 } 134 } 135 136 // WalkFloat32StringMapDeterministic 有序遍历map 137 // walkFunc 函数返回 false,停止遍历 138 func WalkFloat32StringMapDeterministic(in map[float32]string, walkFunc func(k float32, v string) bool) { 139 var keys = make([]float32, 0, len(in)) 140 for k := range in { 141 keys = append(keys, k) 142 } 143 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 144 for _, k := range keys { 145 if walkFunc(k, in[k]) { 146 continue 147 } 148 break 149 } 150 } 151 152 // WalkFloat32UintMapDeterministic 有序遍历map 153 // walkFunc 函数返回 false,停止遍历 154 func WalkFloat32UintMapDeterministic(in map[float32]uint, walkFunc func(k float32, v uint) bool) { 155 var keys = make([]float32, 0, len(in)) 156 for k := range in { 157 keys = append(keys, k) 158 } 159 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 160 for _, k := range keys { 161 if walkFunc(k, in[k]) { 162 continue 163 } 164 break 165 } 166 } 167 168 // WalkFloat32Uint16MapDeterministic 有序遍历map 169 // walkFunc 函数返回 false,停止遍历 170 func WalkFloat32Uint16MapDeterministic(in map[float32]uint16, walkFunc func(k float32, v uint16) bool) { 171 var keys = make([]float32, 0, len(in)) 172 for k := range in { 173 keys = append(keys, k) 174 } 175 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 176 for _, k := range keys { 177 if walkFunc(k, in[k]) { 178 continue 179 } 180 break 181 } 182 } 183 184 // WalkFloat32Uint32MapDeterministic 有序遍历map 185 // walkFunc 函数返回 false,停止遍历 186 func WalkFloat32Uint32MapDeterministic(in map[float32]uint32, walkFunc func(k float32, v uint32) bool) { 187 var keys = make([]float32, 0, len(in)) 188 for k := range in { 189 keys = append(keys, k) 190 } 191 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 192 for _, k := range keys { 193 if walkFunc(k, in[k]) { 194 continue 195 } 196 break 197 } 198 } 199 200 // WalkFloat32Uint64MapDeterministic 有序遍历map 201 // walkFunc 函数返回 false,停止遍历 202 func WalkFloat32Uint64MapDeterministic(in map[float32]uint64, walkFunc func(k float32, v uint64) bool) { 203 var keys = make([]float32, 0, len(in)) 204 for k := range in { 205 keys = append(keys, k) 206 } 207 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 208 for _, k := range keys { 209 if walkFunc(k, in[k]) { 210 continue 211 } 212 break 213 } 214 } 215 216 // WalkFloat32Uint8MapDeterministic 有序遍历map 217 // walkFunc 函数返回 false,停止遍历 218 func WalkFloat32Uint8MapDeterministic(in map[float32]uint8, walkFunc func(k float32, v uint8) bool) { 219 var keys = make([]float32, 0, len(in)) 220 for k := range in { 221 keys = append(keys, k) 222 } 223 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 224 for _, k := range keys { 225 if walkFunc(k, in[k]) { 226 continue 227 } 228 break 229 } 230 } 231 232 // WalkFloat64Float32MapDeterministic 有序遍历map 233 // walkFunc 函数返回 false,停止遍历 234 func WalkFloat64Float32MapDeterministic(in map[float64]float32, walkFunc func(k float64, v float32) bool) { 235 var keys = make([]float64, 0, len(in)) 236 for k := range in { 237 keys = append(keys, k) 238 } 239 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 240 for _, k := range keys { 241 if walkFunc(k, in[k]) { 242 continue 243 } 244 break 245 } 246 } 247 248 // WalkFloat64Float64MapDeterministic 有序遍历map 249 // walkFunc 函数返回 false,停止遍历 250 func WalkFloat64Float64MapDeterministic(in map[float64]float64, walkFunc func(k float64, v float64) bool) { 251 var keys = make([]float64, 0, len(in)) 252 for k := range in { 253 keys = append(keys, k) 254 } 255 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 256 for _, k := range keys { 257 if walkFunc(k, in[k]) { 258 continue 259 } 260 break 261 } 262 } 263 264 // WalkFloat64IntMapDeterministic 有序遍历map 265 // walkFunc 函数返回 false,停止遍历 266 func WalkFloat64IntMapDeterministic(in map[float64]int, walkFunc func(k float64, v int) bool) { 267 var keys = make([]float64, 0, len(in)) 268 for k := range in { 269 keys = append(keys, k) 270 } 271 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 272 for _, k := range keys { 273 if walkFunc(k, in[k]) { 274 continue 275 } 276 break 277 } 278 } 279 280 // WalkFloat64Int16MapDeterministic 有序遍历map 281 // walkFunc 函数返回 false,停止遍历 282 func WalkFloat64Int16MapDeterministic(in map[float64]int16, walkFunc func(k float64, v int16) bool) { 283 var keys = make([]float64, 0, len(in)) 284 for k := range in { 285 keys = append(keys, k) 286 } 287 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 288 for _, k := range keys { 289 if walkFunc(k, in[k]) { 290 continue 291 } 292 break 293 } 294 } 295 296 // WalkFloat64Int32MapDeterministic 有序遍历map 297 // walkFunc 函数返回 false,停止遍历 298 func WalkFloat64Int32MapDeterministic(in map[float64]int32, walkFunc func(k float64, v int32) bool) { 299 var keys = make([]float64, 0, len(in)) 300 for k := range in { 301 keys = append(keys, k) 302 } 303 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 304 for _, k := range keys { 305 if walkFunc(k, in[k]) { 306 continue 307 } 308 break 309 } 310 } 311 312 // WalkFloat64Int64MapDeterministic 有序遍历map 313 // walkFunc 函数返回 false,停止遍历 314 func WalkFloat64Int64MapDeterministic(in map[float64]int64, walkFunc func(k float64, v int64) bool) { 315 var keys = make([]float64, 0, len(in)) 316 for k := range in { 317 keys = append(keys, k) 318 } 319 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 320 for _, k := range keys { 321 if walkFunc(k, in[k]) { 322 continue 323 } 324 break 325 } 326 } 327 328 // WalkFloat64Int8MapDeterministic 有序遍历map 329 // walkFunc 函数返回 false,停止遍历 330 func WalkFloat64Int8MapDeterministic(in map[float64]int8, walkFunc func(k float64, v int8) bool) { 331 var keys = make([]float64, 0, len(in)) 332 for k := range in { 333 keys = append(keys, k) 334 } 335 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 336 for _, k := range keys { 337 if walkFunc(k, in[k]) { 338 continue 339 } 340 break 341 } 342 } 343 344 // WalkFloat64InterfaceMapDeterministic 有序遍历map 345 // walkFunc 函数返回 false,停止遍历 346 func WalkFloat64InterfaceMapDeterministic(in map[float64]interface{}, walkFunc func(k float64, v interface{}) bool) { 347 var keys = make([]float64, 0, len(in)) 348 for k := range in { 349 keys = append(keys, k) 350 } 351 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 352 for _, k := range keys { 353 if walkFunc(k, in[k]) { 354 continue 355 } 356 break 357 } 358 } 359 360 // WalkFloat64StringMapDeterministic 有序遍历map 361 // walkFunc 函数返回 false,停止遍历 362 func WalkFloat64StringMapDeterministic(in map[float64]string, walkFunc func(k float64, v string) bool) { 363 var keys = make([]float64, 0, len(in)) 364 for k := range in { 365 keys = append(keys, k) 366 } 367 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 368 for _, k := range keys { 369 if walkFunc(k, in[k]) { 370 continue 371 } 372 break 373 } 374 } 375 376 // WalkFloat64UintMapDeterministic 有序遍历map 377 // walkFunc 函数返回 false,停止遍历 378 func WalkFloat64UintMapDeterministic(in map[float64]uint, walkFunc func(k float64, v uint) bool) { 379 var keys = make([]float64, 0, len(in)) 380 for k := range in { 381 keys = append(keys, k) 382 } 383 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 384 for _, k := range keys { 385 if walkFunc(k, in[k]) { 386 continue 387 } 388 break 389 } 390 } 391 392 // WalkFloat64Uint16MapDeterministic 有序遍历map 393 // walkFunc 函数返回 false,停止遍历 394 func WalkFloat64Uint16MapDeterministic(in map[float64]uint16, walkFunc func(k float64, v uint16) bool) { 395 var keys = make([]float64, 0, len(in)) 396 for k := range in { 397 keys = append(keys, k) 398 } 399 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 400 for _, k := range keys { 401 if walkFunc(k, in[k]) { 402 continue 403 } 404 break 405 } 406 } 407 408 // WalkFloat64Uint32MapDeterministic 有序遍历map 409 // walkFunc 函数返回 false,停止遍历 410 func WalkFloat64Uint32MapDeterministic(in map[float64]uint32, walkFunc func(k float64, v uint32) bool) { 411 var keys = make([]float64, 0, len(in)) 412 for k := range in { 413 keys = append(keys, k) 414 } 415 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 416 for _, k := range keys { 417 if walkFunc(k, in[k]) { 418 continue 419 } 420 break 421 } 422 } 423 424 // WalkFloat64Uint64MapDeterministic 有序遍历map 425 // walkFunc 函数返回 false,停止遍历 426 func WalkFloat64Uint64MapDeterministic(in map[float64]uint64, walkFunc func(k float64, v uint64) bool) { 427 var keys = make([]float64, 0, len(in)) 428 for k := range in { 429 keys = append(keys, k) 430 } 431 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 432 for _, k := range keys { 433 if walkFunc(k, in[k]) { 434 continue 435 } 436 break 437 } 438 } 439 440 // WalkFloat64Uint8MapDeterministic 有序遍历map 441 // walkFunc 函数返回 false,停止遍历 442 func WalkFloat64Uint8MapDeterministic(in map[float64]uint8, walkFunc func(k float64, v uint8) bool) { 443 var keys = make([]float64, 0, len(in)) 444 for k := range in { 445 keys = append(keys, k) 446 } 447 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 448 for _, k := range keys { 449 if walkFunc(k, in[k]) { 450 continue 451 } 452 break 453 } 454 } 455 456 // WalkIntFloat32MapDeterministic 有序遍历map 457 // walkFunc 函数返回 false,停止遍历 458 func WalkIntFloat32MapDeterministic(in map[int]float32, walkFunc func(k int, v float32) bool) { 459 var keys = make([]int, 0, len(in)) 460 for k := range in { 461 keys = append(keys, k) 462 } 463 sort.Ints(keys) 464 for _, k := range keys { 465 if walkFunc(k, in[k]) { 466 continue 467 } 468 break 469 } 470 } 471 472 // WalkIntFloat64MapDeterministic 有序遍历map 473 // walkFunc 函数返回 false,停止遍历 474 func WalkIntFloat64MapDeterministic(in map[int]float64, walkFunc func(k int, v float64) bool) { 475 var keys = make([]int, 0, len(in)) 476 for k := range in { 477 keys = append(keys, k) 478 } 479 sort.Ints(keys) 480 for _, k := range keys { 481 if walkFunc(k, in[k]) { 482 continue 483 } 484 break 485 } 486 } 487 488 // WalkIntIntMapDeterministic 有序遍历map 489 // walkFunc 函数返回 false,停止遍历 490 func WalkIntIntMapDeterministic(in map[int]int, walkFunc func(k int, v int) bool) { 491 var keys = make([]int, 0, len(in)) 492 for k := range in { 493 keys = append(keys, k) 494 } 495 sort.Ints(keys) 496 for _, k := range keys { 497 if walkFunc(k, in[k]) { 498 continue 499 } 500 break 501 } 502 } 503 504 // WalkIntInt16MapDeterministic 有序遍历map 505 // walkFunc 函数返回 false,停止遍历 506 func WalkIntInt16MapDeterministic(in map[int]int16, walkFunc func(k int, v int16) bool) { 507 var keys = make([]int, 0, len(in)) 508 for k := range in { 509 keys = append(keys, k) 510 } 511 sort.Ints(keys) 512 for _, k := range keys { 513 if walkFunc(k, in[k]) { 514 continue 515 } 516 break 517 } 518 } 519 520 // WalkIntInt32MapDeterministic 有序遍历map 521 // walkFunc 函数返回 false,停止遍历 522 func WalkIntInt32MapDeterministic(in map[int]int32, walkFunc func(k int, v int32) bool) { 523 var keys = make([]int, 0, len(in)) 524 for k := range in { 525 keys = append(keys, k) 526 } 527 sort.Ints(keys) 528 for _, k := range keys { 529 if walkFunc(k, in[k]) { 530 continue 531 } 532 break 533 } 534 } 535 536 // WalkIntInt64MapDeterministic 有序遍历map 537 // walkFunc 函数返回 false,停止遍历 538 func WalkIntInt64MapDeterministic(in map[int]int64, walkFunc func(k int, v int64) bool) { 539 var keys = make([]int, 0, len(in)) 540 for k := range in { 541 keys = append(keys, k) 542 } 543 sort.Ints(keys) 544 for _, k := range keys { 545 if walkFunc(k, in[k]) { 546 continue 547 } 548 break 549 } 550 } 551 552 // WalkIntInt8MapDeterministic 有序遍历map 553 // walkFunc 函数返回 false,停止遍历 554 func WalkIntInt8MapDeterministic(in map[int]int8, walkFunc func(k int, v int8) bool) { 555 var keys = make([]int, 0, len(in)) 556 for k := range in { 557 keys = append(keys, k) 558 } 559 sort.Ints(keys) 560 for _, k := range keys { 561 if walkFunc(k, in[k]) { 562 continue 563 } 564 break 565 } 566 } 567 568 // WalkIntInterfaceMapDeterministic 有序遍历map 569 // walkFunc 函数返回 false,停止遍历 570 func WalkIntInterfaceMapDeterministic(in map[int]interface{}, walkFunc func(k int, v interface{}) bool) { 571 var keys = make([]int, 0, len(in)) 572 for k := range in { 573 keys = append(keys, k) 574 } 575 sort.Ints(keys) 576 for _, k := range keys { 577 if walkFunc(k, in[k]) { 578 continue 579 } 580 break 581 } 582 } 583 584 // WalkIntStringMapDeterministic 有序遍历map 585 // walkFunc 函数返回 false,停止遍历 586 func WalkIntStringMapDeterministic(in map[int]string, walkFunc func(k int, v string) bool) { 587 var keys = make([]int, 0, len(in)) 588 for k := range in { 589 keys = append(keys, k) 590 } 591 sort.Ints(keys) 592 for _, k := range keys { 593 if walkFunc(k, in[k]) { 594 continue 595 } 596 break 597 } 598 } 599 600 // WalkIntUintMapDeterministic 有序遍历map 601 // walkFunc 函数返回 false,停止遍历 602 func WalkIntUintMapDeterministic(in map[int]uint, walkFunc func(k int, v uint) bool) { 603 var keys = make([]int, 0, len(in)) 604 for k := range in { 605 keys = append(keys, k) 606 } 607 sort.Ints(keys) 608 for _, k := range keys { 609 if walkFunc(k, in[k]) { 610 continue 611 } 612 break 613 } 614 } 615 616 // WalkIntUint16MapDeterministic 有序遍历map 617 // walkFunc 函数返回 false,停止遍历 618 func WalkIntUint16MapDeterministic(in map[int]uint16, walkFunc func(k int, v uint16) bool) { 619 var keys = make([]int, 0, len(in)) 620 for k := range in { 621 keys = append(keys, k) 622 } 623 sort.Ints(keys) 624 for _, k := range keys { 625 if walkFunc(k, in[k]) { 626 continue 627 } 628 break 629 } 630 } 631 632 // WalkIntUint32MapDeterministic 有序遍历map 633 // walkFunc 函数返回 false,停止遍历 634 func WalkIntUint32MapDeterministic(in map[int]uint32, walkFunc func(k int, v uint32) bool) { 635 var keys = make([]int, 0, len(in)) 636 for k := range in { 637 keys = append(keys, k) 638 } 639 sort.Ints(keys) 640 for _, k := range keys { 641 if walkFunc(k, in[k]) { 642 continue 643 } 644 break 645 } 646 } 647 648 // WalkIntUint64MapDeterministic 有序遍历map 649 // walkFunc 函数返回 false,停止遍历 650 func WalkIntUint64MapDeterministic(in map[int]uint64, walkFunc func(k int, v uint64) bool) { 651 var keys = make([]int, 0, len(in)) 652 for k := range in { 653 keys = append(keys, k) 654 } 655 sort.Ints(keys) 656 for _, k := range keys { 657 if walkFunc(k, in[k]) { 658 continue 659 } 660 break 661 } 662 } 663 664 // WalkIntUint8MapDeterministic 有序遍历map 665 // walkFunc 函数返回 false,停止遍历 666 func WalkIntUint8MapDeterministic(in map[int]uint8, walkFunc func(k int, v uint8) bool) { 667 var keys = make([]int, 0, len(in)) 668 for k := range in { 669 keys = append(keys, k) 670 } 671 sort.Ints(keys) 672 for _, k := range keys { 673 if walkFunc(k, in[k]) { 674 continue 675 } 676 break 677 } 678 } 679 680 // WalkInt16Float32MapDeterministic 有序遍历map 681 // walkFunc 函数返回 false,停止遍历 682 func WalkInt16Float32MapDeterministic(in map[int16]float32, walkFunc func(k int16, v float32) bool) { 683 var keys = make([]int16, 0, len(in)) 684 for k := range in { 685 keys = append(keys, k) 686 } 687 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 688 for _, k := range keys { 689 if walkFunc(k, in[k]) { 690 continue 691 } 692 break 693 } 694 } 695 696 // WalkInt16Float64MapDeterministic 有序遍历map 697 // walkFunc 函数返回 false,停止遍历 698 func WalkInt16Float64MapDeterministic(in map[int16]float64, walkFunc func(k int16, v float64) bool) { 699 var keys = make([]int16, 0, len(in)) 700 for k := range in { 701 keys = append(keys, k) 702 } 703 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 704 for _, k := range keys { 705 if walkFunc(k, in[k]) { 706 continue 707 } 708 break 709 } 710 } 711 712 // WalkInt16IntMapDeterministic 有序遍历map 713 // walkFunc 函数返回 false,停止遍历 714 func WalkInt16IntMapDeterministic(in map[int16]int, walkFunc func(k int16, v int) bool) { 715 var keys = make([]int16, 0, len(in)) 716 for k := range in { 717 keys = append(keys, k) 718 } 719 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 720 for _, k := range keys { 721 if walkFunc(k, in[k]) { 722 continue 723 } 724 break 725 } 726 } 727 728 // WalkInt16Int16MapDeterministic 有序遍历map 729 // walkFunc 函数返回 false,停止遍历 730 func WalkInt16Int16MapDeterministic(in map[int16]int16, walkFunc func(k int16, v int16) bool) { 731 var keys = make([]int16, 0, len(in)) 732 for k := range in { 733 keys = append(keys, k) 734 } 735 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 736 for _, k := range keys { 737 if walkFunc(k, in[k]) { 738 continue 739 } 740 break 741 } 742 } 743 744 // WalkInt16Int32MapDeterministic 有序遍历map 745 // walkFunc 函数返回 false,停止遍历 746 func WalkInt16Int32MapDeterministic(in map[int16]int32, walkFunc func(k int16, v int32) bool) { 747 var keys = make([]int16, 0, len(in)) 748 for k := range in { 749 keys = append(keys, k) 750 } 751 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 752 for _, k := range keys { 753 if walkFunc(k, in[k]) { 754 continue 755 } 756 break 757 } 758 } 759 760 // WalkInt16Int64MapDeterministic 有序遍历map 761 // walkFunc 函数返回 false,停止遍历 762 func WalkInt16Int64MapDeterministic(in map[int16]int64, walkFunc func(k int16, v int64) bool) { 763 var keys = make([]int16, 0, len(in)) 764 for k := range in { 765 keys = append(keys, k) 766 } 767 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 768 for _, k := range keys { 769 if walkFunc(k, in[k]) { 770 continue 771 } 772 break 773 } 774 } 775 776 // WalkInt16Int8MapDeterministic 有序遍历map 777 // walkFunc 函数返回 false,停止遍历 778 func WalkInt16Int8MapDeterministic(in map[int16]int8, walkFunc func(k int16, v int8) bool) { 779 var keys = make([]int16, 0, len(in)) 780 for k := range in { 781 keys = append(keys, k) 782 } 783 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 784 for _, k := range keys { 785 if walkFunc(k, in[k]) { 786 continue 787 } 788 break 789 } 790 } 791 792 // WalkInt16InterfaceMapDeterministic 有序遍历map 793 // walkFunc 函数返回 false,停止遍历 794 func WalkInt16InterfaceMapDeterministic(in map[int16]interface{}, walkFunc func(k int16, v interface{}) bool) { 795 var keys = make([]int16, 0, len(in)) 796 for k := range in { 797 keys = append(keys, k) 798 } 799 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 800 for _, k := range keys { 801 if walkFunc(k, in[k]) { 802 continue 803 } 804 break 805 } 806 } 807 808 // WalkInt16StringMapDeterministic 有序遍历map 809 // walkFunc 函数返回 false,停止遍历 810 func WalkInt16StringMapDeterministic(in map[int16]string, walkFunc func(k int16, v string) bool) { 811 var keys = make([]int16, 0, len(in)) 812 for k := range in { 813 keys = append(keys, k) 814 } 815 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 816 for _, k := range keys { 817 if walkFunc(k, in[k]) { 818 continue 819 } 820 break 821 } 822 } 823 824 // WalkInt16UintMapDeterministic 有序遍历map 825 // walkFunc 函数返回 false,停止遍历 826 func WalkInt16UintMapDeterministic(in map[int16]uint, walkFunc func(k int16, v uint) bool) { 827 var keys = make([]int16, 0, len(in)) 828 for k := range in { 829 keys = append(keys, k) 830 } 831 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 832 for _, k := range keys { 833 if walkFunc(k, in[k]) { 834 continue 835 } 836 break 837 } 838 } 839 840 // WalkInt16Uint16MapDeterministic 有序遍历map 841 // walkFunc 函数返回 false,停止遍历 842 func WalkInt16Uint16MapDeterministic(in map[int16]uint16, walkFunc func(k int16, v uint16) bool) { 843 var keys = make([]int16, 0, len(in)) 844 for k := range in { 845 keys = append(keys, k) 846 } 847 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 848 for _, k := range keys { 849 if walkFunc(k, in[k]) { 850 continue 851 } 852 break 853 } 854 } 855 856 // WalkInt16Uint32MapDeterministic 有序遍历map 857 // walkFunc 函数返回 false,停止遍历 858 func WalkInt16Uint32MapDeterministic(in map[int16]uint32, walkFunc func(k int16, v uint32) bool) { 859 var keys = make([]int16, 0, len(in)) 860 for k := range in { 861 keys = append(keys, k) 862 } 863 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 864 for _, k := range keys { 865 if walkFunc(k, in[k]) { 866 continue 867 } 868 break 869 } 870 } 871 872 // WalkInt16Uint64MapDeterministic 有序遍历map 873 // walkFunc 函数返回 false,停止遍历 874 func WalkInt16Uint64MapDeterministic(in map[int16]uint64, walkFunc func(k int16, v uint64) bool) { 875 var keys = make([]int16, 0, len(in)) 876 for k := range in { 877 keys = append(keys, k) 878 } 879 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 880 for _, k := range keys { 881 if walkFunc(k, in[k]) { 882 continue 883 } 884 break 885 } 886 } 887 888 // WalkInt16Uint8MapDeterministic 有序遍历map 889 // walkFunc 函数返回 false,停止遍历 890 func WalkInt16Uint8MapDeterministic(in map[int16]uint8, walkFunc func(k int16, v uint8) bool) { 891 var keys = make([]int16, 0, len(in)) 892 for k := range in { 893 keys = append(keys, k) 894 } 895 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 896 for _, k := range keys { 897 if walkFunc(k, in[k]) { 898 continue 899 } 900 break 901 } 902 } 903 904 // WalkInt32Float32MapDeterministic 有序遍历map 905 // walkFunc 函数返回 false,停止遍历 906 func WalkInt32Float32MapDeterministic(in map[int32]float32, walkFunc func(k int32, v float32) bool) { 907 var keys = make([]int32, 0, len(in)) 908 for k := range in { 909 keys = append(keys, k) 910 } 911 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 912 for _, k := range keys { 913 if walkFunc(k, in[k]) { 914 continue 915 } 916 break 917 } 918 } 919 920 // WalkInt32Float64MapDeterministic 有序遍历map 921 // walkFunc 函数返回 false,停止遍历 922 func WalkInt32Float64MapDeterministic(in map[int32]float64, walkFunc func(k int32, v float64) bool) { 923 var keys = make([]int32, 0, len(in)) 924 for k := range in { 925 keys = append(keys, k) 926 } 927 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 928 for _, k := range keys { 929 if walkFunc(k, in[k]) { 930 continue 931 } 932 break 933 } 934 } 935 936 // WalkInt32IntMapDeterministic 有序遍历map 937 // walkFunc 函数返回 false,停止遍历 938 func WalkInt32IntMapDeterministic(in map[int32]int, walkFunc func(k int32, v int) bool) { 939 var keys = make([]int32, 0, len(in)) 940 for k := range in { 941 keys = append(keys, k) 942 } 943 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 944 for _, k := range keys { 945 if walkFunc(k, in[k]) { 946 continue 947 } 948 break 949 } 950 } 951 952 // WalkInt32Int16MapDeterministic 有序遍历map 953 // walkFunc 函数返回 false,停止遍历 954 func WalkInt32Int16MapDeterministic(in map[int32]int16, walkFunc func(k int32, v int16) bool) { 955 var keys = make([]int32, 0, len(in)) 956 for k := range in { 957 keys = append(keys, k) 958 } 959 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 960 for _, k := range keys { 961 if walkFunc(k, in[k]) { 962 continue 963 } 964 break 965 } 966 } 967 968 // WalkInt32Int32MapDeterministic 有序遍历map 969 // walkFunc 函数返回 false,停止遍历 970 func WalkInt32Int32MapDeterministic(in map[int32]int32, walkFunc func(k int32, v int32) bool) { 971 var keys = make([]int32, 0, len(in)) 972 for k := range in { 973 keys = append(keys, k) 974 } 975 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 976 for _, k := range keys { 977 if walkFunc(k, in[k]) { 978 continue 979 } 980 break 981 } 982 } 983 984 // WalkInt32Int64MapDeterministic 有序遍历map 985 // walkFunc 函数返回 false,停止遍历 986 func WalkInt32Int64MapDeterministic(in map[int32]int64, walkFunc func(k int32, v int64) bool) { 987 var keys = make([]int32, 0, len(in)) 988 for k := range in { 989 keys = append(keys, k) 990 } 991 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 992 for _, k := range keys { 993 if walkFunc(k, in[k]) { 994 continue 995 } 996 break 997 } 998 } 999 1000 // WalkInt32Int8MapDeterministic 有序遍历map 1001 // walkFunc 函数返回 false,停止遍历 1002 func WalkInt32Int8MapDeterministic(in map[int32]int8, walkFunc func(k int32, v int8) bool) { 1003 var keys = make([]int32, 0, len(in)) 1004 for k := range in { 1005 keys = append(keys, k) 1006 } 1007 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1008 for _, k := range keys { 1009 if walkFunc(k, in[k]) { 1010 continue 1011 } 1012 break 1013 } 1014 } 1015 1016 // WalkInt32InterfaceMapDeterministic 有序遍历map 1017 // walkFunc 函数返回 false,停止遍历 1018 func WalkInt32InterfaceMapDeterministic(in map[int32]interface{}, walkFunc func(k int32, v interface{}) bool) { 1019 var keys = make([]int32, 0, len(in)) 1020 for k := range in { 1021 keys = append(keys, k) 1022 } 1023 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1024 for _, k := range keys { 1025 if walkFunc(k, in[k]) { 1026 continue 1027 } 1028 break 1029 } 1030 } 1031 1032 // WalkInt32StringMapDeterministic 有序遍历map 1033 // walkFunc 函数返回 false,停止遍历 1034 func WalkInt32StringMapDeterministic(in map[int32]string, walkFunc func(k int32, v string) bool) { 1035 var keys = make([]int32, 0, len(in)) 1036 for k := range in { 1037 keys = append(keys, k) 1038 } 1039 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1040 for _, k := range keys { 1041 if walkFunc(k, in[k]) { 1042 continue 1043 } 1044 break 1045 } 1046 } 1047 1048 // WalkInt32UintMapDeterministic 有序遍历map 1049 // walkFunc 函数返回 false,停止遍历 1050 func WalkInt32UintMapDeterministic(in map[int32]uint, walkFunc func(k int32, v uint) bool) { 1051 var keys = make([]int32, 0, len(in)) 1052 for k := range in { 1053 keys = append(keys, k) 1054 } 1055 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1056 for _, k := range keys { 1057 if walkFunc(k, in[k]) { 1058 continue 1059 } 1060 break 1061 } 1062 } 1063 1064 // WalkInt32Uint16MapDeterministic 有序遍历map 1065 // walkFunc 函数返回 false,停止遍历 1066 func WalkInt32Uint16MapDeterministic(in map[int32]uint16, walkFunc func(k int32, v uint16) bool) { 1067 var keys = make([]int32, 0, len(in)) 1068 for k := range in { 1069 keys = append(keys, k) 1070 } 1071 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1072 for _, k := range keys { 1073 if walkFunc(k, in[k]) { 1074 continue 1075 } 1076 break 1077 } 1078 } 1079 1080 // WalkInt32Uint32MapDeterministic 有序遍历map 1081 // walkFunc 函数返回 false,停止遍历 1082 func WalkInt32Uint32MapDeterministic(in map[int32]uint32, walkFunc func(k int32, v uint32) bool) { 1083 var keys = make([]int32, 0, len(in)) 1084 for k := range in { 1085 keys = append(keys, k) 1086 } 1087 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1088 for _, k := range keys { 1089 if walkFunc(k, in[k]) { 1090 continue 1091 } 1092 break 1093 } 1094 } 1095 1096 // WalkInt32Uint64MapDeterministic 有序遍历map 1097 // walkFunc 函数返回 false,停止遍历 1098 func WalkInt32Uint64MapDeterministic(in map[int32]uint64, walkFunc func(k int32, v uint64) bool) { 1099 var keys = make([]int32, 0, len(in)) 1100 for k := range in { 1101 keys = append(keys, k) 1102 } 1103 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1104 for _, k := range keys { 1105 if walkFunc(k, in[k]) { 1106 continue 1107 } 1108 break 1109 } 1110 } 1111 1112 // WalkInt32Uint8MapDeterministic 有序遍历map 1113 // walkFunc 函数返回 false,停止遍历 1114 func WalkInt32Uint8MapDeterministic(in map[int32]uint8, walkFunc func(k int32, v uint8) bool) { 1115 var keys = make([]int32, 0, len(in)) 1116 for k := range in { 1117 keys = append(keys, k) 1118 } 1119 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1120 for _, k := range keys { 1121 if walkFunc(k, in[k]) { 1122 continue 1123 } 1124 break 1125 } 1126 } 1127 1128 // WalkInt64Float32MapDeterministic 有序遍历map 1129 // walkFunc 函数返回 false,停止遍历 1130 func WalkInt64Float32MapDeterministic(in map[int64]float32, walkFunc func(k int64, v float32) bool) { 1131 var keys = make([]int64, 0, len(in)) 1132 for k := range in { 1133 keys = append(keys, k) 1134 } 1135 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1136 for _, k := range keys { 1137 if walkFunc(k, in[k]) { 1138 continue 1139 } 1140 break 1141 } 1142 } 1143 1144 // WalkInt64Float64MapDeterministic 有序遍历map 1145 // walkFunc 函数返回 false,停止遍历 1146 func WalkInt64Float64MapDeterministic(in map[int64]float64, walkFunc func(k int64, v float64) bool) { 1147 var keys = make([]int64, 0, len(in)) 1148 for k := range in { 1149 keys = append(keys, k) 1150 } 1151 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1152 for _, k := range keys { 1153 if walkFunc(k, in[k]) { 1154 continue 1155 } 1156 break 1157 } 1158 } 1159 1160 // WalkInt64IntMapDeterministic 有序遍历map 1161 // walkFunc 函数返回 false,停止遍历 1162 func WalkInt64IntMapDeterministic(in map[int64]int, walkFunc func(k int64, v int) bool) { 1163 var keys = make([]int64, 0, len(in)) 1164 for k := range in { 1165 keys = append(keys, k) 1166 } 1167 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1168 for _, k := range keys { 1169 if walkFunc(k, in[k]) { 1170 continue 1171 } 1172 break 1173 } 1174 } 1175 1176 // WalkInt64Int16MapDeterministic 有序遍历map 1177 // walkFunc 函数返回 false,停止遍历 1178 func WalkInt64Int16MapDeterministic(in map[int64]int16, walkFunc func(k int64, v int16) bool) { 1179 var keys = make([]int64, 0, len(in)) 1180 for k := range in { 1181 keys = append(keys, k) 1182 } 1183 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1184 for _, k := range keys { 1185 if walkFunc(k, in[k]) { 1186 continue 1187 } 1188 break 1189 } 1190 } 1191 1192 // WalkInt64Int32MapDeterministic 有序遍历map 1193 // walkFunc 函数返回 false,停止遍历 1194 func WalkInt64Int32MapDeterministic(in map[int64]int32, walkFunc func(k int64, v int32) bool) { 1195 var keys = make([]int64, 0, len(in)) 1196 for k := range in { 1197 keys = append(keys, k) 1198 } 1199 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1200 for _, k := range keys { 1201 if walkFunc(k, in[k]) { 1202 continue 1203 } 1204 break 1205 } 1206 } 1207 1208 // WalkInt64Int64MapDeterministic 有序遍历map 1209 // walkFunc 函数返回 false,停止遍历 1210 func WalkInt64Int64MapDeterministic(in map[int64]int64, walkFunc func(k int64, v int64) bool) { 1211 var keys = make([]int64, 0, len(in)) 1212 for k := range in { 1213 keys = append(keys, k) 1214 } 1215 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1216 for _, k := range keys { 1217 if walkFunc(k, in[k]) { 1218 continue 1219 } 1220 break 1221 } 1222 } 1223 1224 // WalkInt64Int8MapDeterministic 有序遍历map 1225 // walkFunc 函数返回 false,停止遍历 1226 func WalkInt64Int8MapDeterministic(in map[int64]int8, walkFunc func(k int64, v int8) bool) { 1227 var keys = make([]int64, 0, len(in)) 1228 for k := range in { 1229 keys = append(keys, k) 1230 } 1231 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1232 for _, k := range keys { 1233 if walkFunc(k, in[k]) { 1234 continue 1235 } 1236 break 1237 } 1238 } 1239 1240 // WalkInt64InterfaceMapDeterministic 有序遍历map 1241 // walkFunc 函数返回 false,停止遍历 1242 func WalkInt64InterfaceMapDeterministic(in map[int64]interface{}, walkFunc func(k int64, v interface{}) bool) { 1243 var keys = make([]int64, 0, len(in)) 1244 for k := range in { 1245 keys = append(keys, k) 1246 } 1247 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1248 for _, k := range keys { 1249 if walkFunc(k, in[k]) { 1250 continue 1251 } 1252 break 1253 } 1254 } 1255 1256 // WalkInt64StringMapDeterministic 有序遍历map 1257 // walkFunc 函数返回 false,停止遍历 1258 func WalkInt64StringMapDeterministic(in map[int64]string, walkFunc func(k int64, v string) bool) { 1259 var keys = make([]int64, 0, len(in)) 1260 for k := range in { 1261 keys = append(keys, k) 1262 } 1263 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1264 for _, k := range keys { 1265 if walkFunc(k, in[k]) { 1266 continue 1267 } 1268 break 1269 } 1270 } 1271 1272 // WalkInt64UintMapDeterministic 有序遍历map 1273 // walkFunc 函数返回 false,停止遍历 1274 func WalkInt64UintMapDeterministic(in map[int64]uint, walkFunc func(k int64, v uint) bool) { 1275 var keys = make([]int64, 0, len(in)) 1276 for k := range in { 1277 keys = append(keys, k) 1278 } 1279 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1280 for _, k := range keys { 1281 if walkFunc(k, in[k]) { 1282 continue 1283 } 1284 break 1285 } 1286 } 1287 1288 // WalkInt64Uint16MapDeterministic 有序遍历map 1289 // walkFunc 函数返回 false,停止遍历 1290 func WalkInt64Uint16MapDeterministic(in map[int64]uint16, walkFunc func(k int64, v uint16) bool) { 1291 var keys = make([]int64, 0, len(in)) 1292 for k := range in { 1293 keys = append(keys, k) 1294 } 1295 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1296 for _, k := range keys { 1297 if walkFunc(k, in[k]) { 1298 continue 1299 } 1300 break 1301 } 1302 } 1303 1304 // WalkInt64Uint32MapDeterministic 有序遍历map 1305 // walkFunc 函数返回 false,停止遍历 1306 func WalkInt64Uint32MapDeterministic(in map[int64]uint32, walkFunc func(k int64, v uint32) bool) { 1307 var keys = make([]int64, 0, len(in)) 1308 for k := range in { 1309 keys = append(keys, k) 1310 } 1311 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1312 for _, k := range keys { 1313 if walkFunc(k, in[k]) { 1314 continue 1315 } 1316 break 1317 } 1318 } 1319 1320 // WalkInt64Uint64MapDeterministic 有序遍历map 1321 // walkFunc 函数返回 false,停止遍历 1322 func WalkInt64Uint64MapDeterministic(in map[int64]uint64, walkFunc func(k int64, v uint64) bool) { 1323 var keys = make([]int64, 0, len(in)) 1324 for k := range in { 1325 keys = append(keys, k) 1326 } 1327 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1328 for _, k := range keys { 1329 if walkFunc(k, in[k]) { 1330 continue 1331 } 1332 break 1333 } 1334 } 1335 1336 // WalkInt64Uint8MapDeterministic 有序遍历map 1337 // walkFunc 函数返回 false,停止遍历 1338 func WalkInt64Uint8MapDeterministic(in map[int64]uint8, walkFunc func(k int64, v uint8) bool) { 1339 var keys = make([]int64, 0, len(in)) 1340 for k := range in { 1341 keys = append(keys, k) 1342 } 1343 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1344 for _, k := range keys { 1345 if walkFunc(k, in[k]) { 1346 continue 1347 } 1348 break 1349 } 1350 } 1351 1352 // WalkInt8Float32MapDeterministic 有序遍历map 1353 // walkFunc 函数返回 false,停止遍历 1354 func WalkInt8Float32MapDeterministic(in map[int8]float32, walkFunc func(k int8, v float32) bool) { 1355 var keys = make([]int8, 0, len(in)) 1356 for k := range in { 1357 keys = append(keys, k) 1358 } 1359 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1360 for _, k := range keys { 1361 if walkFunc(k, in[k]) { 1362 continue 1363 } 1364 break 1365 } 1366 } 1367 1368 // WalkInt8Float64MapDeterministic 有序遍历map 1369 // walkFunc 函数返回 false,停止遍历 1370 func WalkInt8Float64MapDeterministic(in map[int8]float64, walkFunc func(k int8, v float64) bool) { 1371 var keys = make([]int8, 0, len(in)) 1372 for k := range in { 1373 keys = append(keys, k) 1374 } 1375 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1376 for _, k := range keys { 1377 if walkFunc(k, in[k]) { 1378 continue 1379 } 1380 break 1381 } 1382 } 1383 1384 // WalkInt8IntMapDeterministic 有序遍历map 1385 // walkFunc 函数返回 false,停止遍历 1386 func WalkInt8IntMapDeterministic(in map[int8]int, walkFunc func(k int8, v int) bool) { 1387 var keys = make([]int8, 0, len(in)) 1388 for k := range in { 1389 keys = append(keys, k) 1390 } 1391 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1392 for _, k := range keys { 1393 if walkFunc(k, in[k]) { 1394 continue 1395 } 1396 break 1397 } 1398 } 1399 1400 // WalkInt8Int16MapDeterministic 有序遍历map 1401 // walkFunc 函数返回 false,停止遍历 1402 func WalkInt8Int16MapDeterministic(in map[int8]int16, walkFunc func(k int8, v int16) bool) { 1403 var keys = make([]int8, 0, len(in)) 1404 for k := range in { 1405 keys = append(keys, k) 1406 } 1407 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1408 for _, k := range keys { 1409 if walkFunc(k, in[k]) { 1410 continue 1411 } 1412 break 1413 } 1414 } 1415 1416 // WalkInt8Int32MapDeterministic 有序遍历map 1417 // walkFunc 函数返回 false,停止遍历 1418 func WalkInt8Int32MapDeterministic(in map[int8]int32, walkFunc func(k int8, v int32) bool) { 1419 var keys = make([]int8, 0, len(in)) 1420 for k := range in { 1421 keys = append(keys, k) 1422 } 1423 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1424 for _, k := range keys { 1425 if walkFunc(k, in[k]) { 1426 continue 1427 } 1428 break 1429 } 1430 } 1431 1432 // WalkInt8Int64MapDeterministic 有序遍历map 1433 // walkFunc 函数返回 false,停止遍历 1434 func WalkInt8Int64MapDeterministic(in map[int8]int64, walkFunc func(k int8, v int64) bool) { 1435 var keys = make([]int8, 0, len(in)) 1436 for k := range in { 1437 keys = append(keys, k) 1438 } 1439 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1440 for _, k := range keys { 1441 if walkFunc(k, in[k]) { 1442 continue 1443 } 1444 break 1445 } 1446 } 1447 1448 // WalkInt8Int8MapDeterministic 有序遍历map 1449 // walkFunc 函数返回 false,停止遍历 1450 func WalkInt8Int8MapDeterministic(in map[int8]int8, walkFunc func(k int8, v int8) bool) { 1451 var keys = make([]int8, 0, len(in)) 1452 for k := range in { 1453 keys = append(keys, k) 1454 } 1455 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1456 for _, k := range keys { 1457 if walkFunc(k, in[k]) { 1458 continue 1459 } 1460 break 1461 } 1462 } 1463 1464 // WalkInt8InterfaceMapDeterministic 有序遍历map 1465 // walkFunc 函数返回 false,停止遍历 1466 func WalkInt8InterfaceMapDeterministic(in map[int8]interface{}, walkFunc func(k int8, v interface{}) bool) { 1467 var keys = make([]int8, 0, len(in)) 1468 for k := range in { 1469 keys = append(keys, k) 1470 } 1471 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1472 for _, k := range keys { 1473 if walkFunc(k, in[k]) { 1474 continue 1475 } 1476 break 1477 } 1478 } 1479 1480 // WalkInt8StringMapDeterministic 有序遍历map 1481 // walkFunc 函数返回 false,停止遍历 1482 func WalkInt8StringMapDeterministic(in map[int8]string, walkFunc func(k int8, v string) bool) { 1483 var keys = make([]int8, 0, len(in)) 1484 for k := range in { 1485 keys = append(keys, k) 1486 } 1487 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1488 for _, k := range keys { 1489 if walkFunc(k, in[k]) { 1490 continue 1491 } 1492 break 1493 } 1494 } 1495 1496 // WalkInt8UintMapDeterministic 有序遍历map 1497 // walkFunc 函数返回 false,停止遍历 1498 func WalkInt8UintMapDeterministic(in map[int8]uint, walkFunc func(k int8, v uint) bool) { 1499 var keys = make([]int8, 0, len(in)) 1500 for k := range in { 1501 keys = append(keys, k) 1502 } 1503 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1504 for _, k := range keys { 1505 if walkFunc(k, in[k]) { 1506 continue 1507 } 1508 break 1509 } 1510 } 1511 1512 // WalkInt8Uint16MapDeterministic 有序遍历map 1513 // walkFunc 函数返回 false,停止遍历 1514 func WalkInt8Uint16MapDeterministic(in map[int8]uint16, walkFunc func(k int8, v uint16) bool) { 1515 var keys = make([]int8, 0, len(in)) 1516 for k := range in { 1517 keys = append(keys, k) 1518 } 1519 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1520 for _, k := range keys { 1521 if walkFunc(k, in[k]) { 1522 continue 1523 } 1524 break 1525 } 1526 } 1527 1528 // WalkInt8Uint32MapDeterministic 有序遍历map 1529 // walkFunc 函数返回 false,停止遍历 1530 func WalkInt8Uint32MapDeterministic(in map[int8]uint32, walkFunc func(k int8, v uint32) bool) { 1531 var keys = make([]int8, 0, len(in)) 1532 for k := range in { 1533 keys = append(keys, k) 1534 } 1535 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1536 for _, k := range keys { 1537 if walkFunc(k, in[k]) { 1538 continue 1539 } 1540 break 1541 } 1542 } 1543 1544 // WalkInt8Uint64MapDeterministic 有序遍历map 1545 // walkFunc 函数返回 false,停止遍历 1546 func WalkInt8Uint64MapDeterministic(in map[int8]uint64, walkFunc func(k int8, v uint64) bool) { 1547 var keys = make([]int8, 0, len(in)) 1548 for k := range in { 1549 keys = append(keys, k) 1550 } 1551 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1552 for _, k := range keys { 1553 if walkFunc(k, in[k]) { 1554 continue 1555 } 1556 break 1557 } 1558 } 1559 1560 // WalkInt8Uint8MapDeterministic 有序遍历map 1561 // walkFunc 函数返回 false,停止遍历 1562 func WalkInt8Uint8MapDeterministic(in map[int8]uint8, walkFunc func(k int8, v uint8) bool) { 1563 var keys = make([]int8, 0, len(in)) 1564 for k := range in { 1565 keys = append(keys, k) 1566 } 1567 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1568 for _, k := range keys { 1569 if walkFunc(k, in[k]) { 1570 continue 1571 } 1572 break 1573 } 1574 } 1575 1576 // WalkStringFloat32MapDeterministic 有序遍历map 1577 // walkFunc 函数返回 false,停止遍历 1578 func WalkStringFloat32MapDeterministic(in map[string]float32, walkFunc func(k string, v float32) bool) { 1579 var keys = make([]string, 0, len(in)) 1580 for k := range in { 1581 keys = append(keys, k) 1582 } 1583 sort.Strings(keys) 1584 for _, k := range keys { 1585 if walkFunc(k, in[k]) { 1586 continue 1587 } 1588 break 1589 } 1590 } 1591 1592 // WalkStringFloat64MapDeterministic 有序遍历map 1593 // walkFunc 函数返回 false,停止遍历 1594 func WalkStringFloat64MapDeterministic(in map[string]float64, walkFunc func(k string, v float64) bool) { 1595 var keys = make([]string, 0, len(in)) 1596 for k := range in { 1597 keys = append(keys, k) 1598 } 1599 sort.Strings(keys) 1600 for _, k := range keys { 1601 if walkFunc(k, in[k]) { 1602 continue 1603 } 1604 break 1605 } 1606 } 1607 1608 // WalkStringIntMapDeterministic 有序遍历map 1609 // walkFunc 函数返回 false,停止遍历 1610 func WalkStringIntMapDeterministic(in map[string]int, walkFunc func(k string, v int) bool) { 1611 var keys = make([]string, 0, len(in)) 1612 for k := range in { 1613 keys = append(keys, k) 1614 } 1615 sort.Strings(keys) 1616 for _, k := range keys { 1617 if walkFunc(k, in[k]) { 1618 continue 1619 } 1620 break 1621 } 1622 } 1623 1624 // WalkStringInt16MapDeterministic 有序遍历map 1625 // walkFunc 函数返回 false,停止遍历 1626 func WalkStringInt16MapDeterministic(in map[string]int16, walkFunc func(k string, v int16) bool) { 1627 var keys = make([]string, 0, len(in)) 1628 for k := range in { 1629 keys = append(keys, k) 1630 } 1631 sort.Strings(keys) 1632 for _, k := range keys { 1633 if walkFunc(k, in[k]) { 1634 continue 1635 } 1636 break 1637 } 1638 } 1639 1640 // WalkStringInt32MapDeterministic 有序遍历map 1641 // walkFunc 函数返回 false,停止遍历 1642 func WalkStringInt32MapDeterministic(in map[string]int32, walkFunc func(k string, v int32) bool) { 1643 var keys = make([]string, 0, len(in)) 1644 for k := range in { 1645 keys = append(keys, k) 1646 } 1647 sort.Strings(keys) 1648 for _, k := range keys { 1649 if walkFunc(k, in[k]) { 1650 continue 1651 } 1652 break 1653 } 1654 } 1655 1656 // WalkStringInt64MapDeterministic 有序遍历map 1657 // walkFunc 函数返回 false,停止遍历 1658 func WalkStringInt64MapDeterministic(in map[string]int64, walkFunc func(k string, v int64) bool) { 1659 var keys = make([]string, 0, len(in)) 1660 for k := range in { 1661 keys = append(keys, k) 1662 } 1663 sort.Strings(keys) 1664 for _, k := range keys { 1665 if walkFunc(k, in[k]) { 1666 continue 1667 } 1668 break 1669 } 1670 } 1671 1672 // WalkStringInt8MapDeterministic 有序遍历map 1673 // walkFunc 函数返回 false,停止遍历 1674 func WalkStringInt8MapDeterministic(in map[string]int8, walkFunc func(k string, v int8) bool) { 1675 var keys = make([]string, 0, len(in)) 1676 for k := range in { 1677 keys = append(keys, k) 1678 } 1679 sort.Strings(keys) 1680 for _, k := range keys { 1681 if walkFunc(k, in[k]) { 1682 continue 1683 } 1684 break 1685 } 1686 } 1687 1688 // WalkStringInterfaceMapDeterministic 有序遍历map 1689 // walkFunc 函数返回 false,停止遍历 1690 func WalkStringInterfaceMapDeterministic(in map[string]interface{}, walkFunc func(k string, v interface{}) bool) { 1691 var keys = make([]string, 0, len(in)) 1692 for k := range in { 1693 keys = append(keys, k) 1694 } 1695 sort.Strings(keys) 1696 for _, k := range keys { 1697 if walkFunc(k, in[k]) { 1698 continue 1699 } 1700 break 1701 } 1702 } 1703 1704 // WalkStringStringMapDeterministic 有序遍历map 1705 // walkFunc 函数返回 false,停止遍历 1706 func WalkStringStringMapDeterministic(in map[string]string, walkFunc func(k string, v string) bool) { 1707 var keys = make([]string, 0, len(in)) 1708 for k := range in { 1709 keys = append(keys, k) 1710 } 1711 sort.Strings(keys) 1712 for _, k := range keys { 1713 if walkFunc(k, in[k]) { 1714 continue 1715 } 1716 break 1717 } 1718 } 1719 1720 // WalkStringUintMapDeterministic 有序遍历map 1721 // walkFunc 函数返回 false,停止遍历 1722 func WalkStringUintMapDeterministic(in map[string]uint, walkFunc func(k string, v uint) bool) { 1723 var keys = make([]string, 0, len(in)) 1724 for k := range in { 1725 keys = append(keys, k) 1726 } 1727 sort.Strings(keys) 1728 for _, k := range keys { 1729 if walkFunc(k, in[k]) { 1730 continue 1731 } 1732 break 1733 } 1734 } 1735 1736 // WalkStringUint16MapDeterministic 有序遍历map 1737 // walkFunc 函数返回 false,停止遍历 1738 func WalkStringUint16MapDeterministic(in map[string]uint16, walkFunc func(k string, v uint16) bool) { 1739 var keys = make([]string, 0, len(in)) 1740 for k := range in { 1741 keys = append(keys, k) 1742 } 1743 sort.Strings(keys) 1744 for _, k := range keys { 1745 if walkFunc(k, in[k]) { 1746 continue 1747 } 1748 break 1749 } 1750 } 1751 1752 // WalkStringUint32MapDeterministic 有序遍历map 1753 // walkFunc 函数返回 false,停止遍历 1754 func WalkStringUint32MapDeterministic(in map[string]uint32, walkFunc func(k string, v uint32) bool) { 1755 var keys = make([]string, 0, len(in)) 1756 for k := range in { 1757 keys = append(keys, k) 1758 } 1759 sort.Strings(keys) 1760 for _, k := range keys { 1761 if walkFunc(k, in[k]) { 1762 continue 1763 } 1764 break 1765 } 1766 } 1767 1768 // WalkStringUint64MapDeterministic 有序遍历map 1769 // walkFunc 函数返回 false,停止遍历 1770 func WalkStringUint64MapDeterministic(in map[string]uint64, walkFunc func(k string, v uint64) bool) { 1771 var keys = make([]string, 0, len(in)) 1772 for k := range in { 1773 keys = append(keys, k) 1774 } 1775 sort.Strings(keys) 1776 for _, k := range keys { 1777 if walkFunc(k, in[k]) { 1778 continue 1779 } 1780 break 1781 } 1782 } 1783 1784 // WalkStringUint8MapDeterministic 有序遍历map 1785 // walkFunc 函数返回 false,停止遍历 1786 func WalkStringUint8MapDeterministic(in map[string]uint8, walkFunc func(k string, v uint8) bool) { 1787 var keys = make([]string, 0, len(in)) 1788 for k := range in { 1789 keys = append(keys, k) 1790 } 1791 sort.Strings(keys) 1792 for _, k := range keys { 1793 if walkFunc(k, in[k]) { 1794 continue 1795 } 1796 break 1797 } 1798 } 1799 1800 // WalkUintFloat32MapDeterministic 有序遍历map 1801 // walkFunc 函数返回 false,停止遍历 1802 func WalkUintFloat32MapDeterministic(in map[uint]float32, walkFunc func(k uint, v float32) bool) { 1803 var keys = make([]uint, 0, len(in)) 1804 for k := range in { 1805 keys = append(keys, k) 1806 } 1807 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1808 for _, k := range keys { 1809 if walkFunc(k, in[k]) { 1810 continue 1811 } 1812 break 1813 } 1814 } 1815 1816 // WalkUintFloat64MapDeterministic 有序遍历map 1817 // walkFunc 函数返回 false,停止遍历 1818 func WalkUintFloat64MapDeterministic(in map[uint]float64, walkFunc func(k uint, v float64) bool) { 1819 var keys = make([]uint, 0, len(in)) 1820 for k := range in { 1821 keys = append(keys, k) 1822 } 1823 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1824 for _, k := range keys { 1825 if walkFunc(k, in[k]) { 1826 continue 1827 } 1828 break 1829 } 1830 } 1831 1832 // WalkUintIntMapDeterministic 有序遍历map 1833 // walkFunc 函数返回 false,停止遍历 1834 func WalkUintIntMapDeterministic(in map[uint]int, walkFunc func(k uint, v int) bool) { 1835 var keys = make([]uint, 0, len(in)) 1836 for k := range in { 1837 keys = append(keys, k) 1838 } 1839 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1840 for _, k := range keys { 1841 if walkFunc(k, in[k]) { 1842 continue 1843 } 1844 break 1845 } 1846 } 1847 1848 // WalkUintInt16MapDeterministic 有序遍历map 1849 // walkFunc 函数返回 false,停止遍历 1850 func WalkUintInt16MapDeterministic(in map[uint]int16, walkFunc func(k uint, v int16) bool) { 1851 var keys = make([]uint, 0, len(in)) 1852 for k := range in { 1853 keys = append(keys, k) 1854 } 1855 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1856 for _, k := range keys { 1857 if walkFunc(k, in[k]) { 1858 continue 1859 } 1860 break 1861 } 1862 } 1863 1864 // WalkUintInt32MapDeterministic 有序遍历map 1865 // walkFunc 函数返回 false,停止遍历 1866 func WalkUintInt32MapDeterministic(in map[uint]int32, walkFunc func(k uint, v int32) bool) { 1867 var keys = make([]uint, 0, len(in)) 1868 for k := range in { 1869 keys = append(keys, k) 1870 } 1871 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1872 for _, k := range keys { 1873 if walkFunc(k, in[k]) { 1874 continue 1875 } 1876 break 1877 } 1878 } 1879 1880 // WalkUintInt64MapDeterministic 有序遍历map 1881 // walkFunc 函数返回 false,停止遍历 1882 func WalkUintInt64MapDeterministic(in map[uint]int64, walkFunc func(k uint, v int64) bool) { 1883 var keys = make([]uint, 0, len(in)) 1884 for k := range in { 1885 keys = append(keys, k) 1886 } 1887 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1888 for _, k := range keys { 1889 if walkFunc(k, in[k]) { 1890 continue 1891 } 1892 break 1893 } 1894 } 1895 1896 // WalkUintInt8MapDeterministic 有序遍历map 1897 // walkFunc 函数返回 false,停止遍历 1898 func WalkUintInt8MapDeterministic(in map[uint]int8, walkFunc func(k uint, v int8) bool) { 1899 var keys = make([]uint, 0, len(in)) 1900 for k := range in { 1901 keys = append(keys, k) 1902 } 1903 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1904 for _, k := range keys { 1905 if walkFunc(k, in[k]) { 1906 continue 1907 } 1908 break 1909 } 1910 } 1911 1912 // WalkUintInterfaceMapDeterministic 有序遍历map 1913 // walkFunc 函数返回 false,停止遍历 1914 func WalkUintInterfaceMapDeterministic(in map[uint]interface{}, walkFunc func(k uint, v interface{}) bool) { 1915 var keys = make([]uint, 0, len(in)) 1916 for k := range in { 1917 keys = append(keys, k) 1918 } 1919 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1920 for _, k := range keys { 1921 if walkFunc(k, in[k]) { 1922 continue 1923 } 1924 break 1925 } 1926 } 1927 1928 // WalkUintStringMapDeterministic 有序遍历map 1929 // walkFunc 函数返回 false,停止遍历 1930 func WalkUintStringMapDeterministic(in map[uint]string, walkFunc func(k uint, v string) bool) { 1931 var keys = make([]uint, 0, len(in)) 1932 for k := range in { 1933 keys = append(keys, k) 1934 } 1935 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1936 for _, k := range keys { 1937 if walkFunc(k, in[k]) { 1938 continue 1939 } 1940 break 1941 } 1942 } 1943 1944 // WalkUintUintMapDeterministic 有序遍历map 1945 // walkFunc 函数返回 false,停止遍历 1946 func WalkUintUintMapDeterministic(in map[uint]uint, walkFunc func(k uint, v uint) bool) { 1947 var keys = make([]uint, 0, len(in)) 1948 for k := range in { 1949 keys = append(keys, k) 1950 } 1951 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1952 for _, k := range keys { 1953 if walkFunc(k, in[k]) { 1954 continue 1955 } 1956 break 1957 } 1958 } 1959 1960 // WalkUintUint16MapDeterministic 有序遍历map 1961 // walkFunc 函数返回 false,停止遍历 1962 func WalkUintUint16MapDeterministic(in map[uint]uint16, walkFunc func(k uint, v uint16) bool) { 1963 var keys = make([]uint, 0, len(in)) 1964 for k := range in { 1965 keys = append(keys, k) 1966 } 1967 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1968 for _, k := range keys { 1969 if walkFunc(k, in[k]) { 1970 continue 1971 } 1972 break 1973 } 1974 } 1975 1976 // WalkUintUint32MapDeterministic 有序遍历map 1977 // walkFunc 函数返回 false,停止遍历 1978 func WalkUintUint32MapDeterministic(in map[uint]uint32, walkFunc func(k uint, v uint32) bool) { 1979 var keys = make([]uint, 0, len(in)) 1980 for k := range in { 1981 keys = append(keys, k) 1982 } 1983 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 1984 for _, k := range keys { 1985 if walkFunc(k, in[k]) { 1986 continue 1987 } 1988 break 1989 } 1990 } 1991 1992 // WalkUintUint64MapDeterministic 有序遍历map 1993 // walkFunc 函数返回 false,停止遍历 1994 func WalkUintUint64MapDeterministic(in map[uint]uint64, walkFunc func(k uint, v uint64) bool) { 1995 var keys = make([]uint, 0, len(in)) 1996 for k := range in { 1997 keys = append(keys, k) 1998 } 1999 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2000 for _, k := range keys { 2001 if walkFunc(k, in[k]) { 2002 continue 2003 } 2004 break 2005 } 2006 } 2007 2008 // WalkUintUint8MapDeterministic 有序遍历map 2009 // walkFunc 函数返回 false,停止遍历 2010 func WalkUintUint8MapDeterministic(in map[uint]uint8, walkFunc func(k uint, v uint8) bool) { 2011 var keys = make([]uint, 0, len(in)) 2012 for k := range in { 2013 keys = append(keys, k) 2014 } 2015 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2016 for _, k := range keys { 2017 if walkFunc(k, in[k]) { 2018 continue 2019 } 2020 break 2021 } 2022 } 2023 2024 // WalkUint16Float32MapDeterministic 有序遍历map 2025 // walkFunc 函数返回 false,停止遍历 2026 func WalkUint16Float32MapDeterministic(in map[uint16]float32, walkFunc func(k uint16, v float32) bool) { 2027 var keys = make([]uint16, 0, len(in)) 2028 for k := range in { 2029 keys = append(keys, k) 2030 } 2031 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2032 for _, k := range keys { 2033 if walkFunc(k, in[k]) { 2034 continue 2035 } 2036 break 2037 } 2038 } 2039 2040 // WalkUint16Float64MapDeterministic 有序遍历map 2041 // walkFunc 函数返回 false,停止遍历 2042 func WalkUint16Float64MapDeterministic(in map[uint16]float64, walkFunc func(k uint16, v float64) bool) { 2043 var keys = make([]uint16, 0, len(in)) 2044 for k := range in { 2045 keys = append(keys, k) 2046 } 2047 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2048 for _, k := range keys { 2049 if walkFunc(k, in[k]) { 2050 continue 2051 } 2052 break 2053 } 2054 } 2055 2056 // WalkUint16IntMapDeterministic 有序遍历map 2057 // walkFunc 函数返回 false,停止遍历 2058 func WalkUint16IntMapDeterministic(in map[uint16]int, walkFunc func(k uint16, v int) bool) { 2059 var keys = make([]uint16, 0, len(in)) 2060 for k := range in { 2061 keys = append(keys, k) 2062 } 2063 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2064 for _, k := range keys { 2065 if walkFunc(k, in[k]) { 2066 continue 2067 } 2068 break 2069 } 2070 } 2071 2072 // WalkUint16Int16MapDeterministic 有序遍历map 2073 // walkFunc 函数返回 false,停止遍历 2074 func WalkUint16Int16MapDeterministic(in map[uint16]int16, walkFunc func(k uint16, v int16) bool) { 2075 var keys = make([]uint16, 0, len(in)) 2076 for k := range in { 2077 keys = append(keys, k) 2078 } 2079 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2080 for _, k := range keys { 2081 if walkFunc(k, in[k]) { 2082 continue 2083 } 2084 break 2085 } 2086 } 2087 2088 // WalkUint16Int32MapDeterministic 有序遍历map 2089 // walkFunc 函数返回 false,停止遍历 2090 func WalkUint16Int32MapDeterministic(in map[uint16]int32, walkFunc func(k uint16, v int32) bool) { 2091 var keys = make([]uint16, 0, len(in)) 2092 for k := range in { 2093 keys = append(keys, k) 2094 } 2095 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2096 for _, k := range keys { 2097 if walkFunc(k, in[k]) { 2098 continue 2099 } 2100 break 2101 } 2102 } 2103 2104 // WalkUint16Int64MapDeterministic 有序遍历map 2105 // walkFunc 函数返回 false,停止遍历 2106 func WalkUint16Int64MapDeterministic(in map[uint16]int64, walkFunc func(k uint16, v int64) bool) { 2107 var keys = make([]uint16, 0, len(in)) 2108 for k := range in { 2109 keys = append(keys, k) 2110 } 2111 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2112 for _, k := range keys { 2113 if walkFunc(k, in[k]) { 2114 continue 2115 } 2116 break 2117 } 2118 } 2119 2120 // WalkUint16Int8MapDeterministic 有序遍历map 2121 // walkFunc 函数返回 false,停止遍历 2122 func WalkUint16Int8MapDeterministic(in map[uint16]int8, walkFunc func(k uint16, v int8) bool) { 2123 var keys = make([]uint16, 0, len(in)) 2124 for k := range in { 2125 keys = append(keys, k) 2126 } 2127 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2128 for _, k := range keys { 2129 if walkFunc(k, in[k]) { 2130 continue 2131 } 2132 break 2133 } 2134 } 2135 2136 // WalkUint16InterfaceMapDeterministic 有序遍历map 2137 // walkFunc 函数返回 false,停止遍历 2138 func WalkUint16InterfaceMapDeterministic(in map[uint16]interface{}, walkFunc func(k uint16, v interface{}) bool) { 2139 var keys = make([]uint16, 0, len(in)) 2140 for k := range in { 2141 keys = append(keys, k) 2142 } 2143 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2144 for _, k := range keys { 2145 if walkFunc(k, in[k]) { 2146 continue 2147 } 2148 break 2149 } 2150 } 2151 2152 // WalkUint16StringMapDeterministic 有序遍历map 2153 // walkFunc 函数返回 false,停止遍历 2154 func WalkUint16StringMapDeterministic(in map[uint16]string, walkFunc func(k uint16, v string) bool) { 2155 var keys = make([]uint16, 0, len(in)) 2156 for k := range in { 2157 keys = append(keys, k) 2158 } 2159 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2160 for _, k := range keys { 2161 if walkFunc(k, in[k]) { 2162 continue 2163 } 2164 break 2165 } 2166 } 2167 2168 // WalkUint16UintMapDeterministic 有序遍历map 2169 // walkFunc 函数返回 false,停止遍历 2170 func WalkUint16UintMapDeterministic(in map[uint16]uint, walkFunc func(k uint16, v uint) bool) { 2171 var keys = make([]uint16, 0, len(in)) 2172 for k := range in { 2173 keys = append(keys, k) 2174 } 2175 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2176 for _, k := range keys { 2177 if walkFunc(k, in[k]) { 2178 continue 2179 } 2180 break 2181 } 2182 } 2183 2184 // WalkUint16Uint16MapDeterministic 有序遍历map 2185 // walkFunc 函数返回 false,停止遍历 2186 func WalkUint16Uint16MapDeterministic(in map[uint16]uint16, walkFunc func(k uint16, v uint16) bool) { 2187 var keys = make([]uint16, 0, len(in)) 2188 for k := range in { 2189 keys = append(keys, k) 2190 } 2191 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2192 for _, k := range keys { 2193 if walkFunc(k, in[k]) { 2194 continue 2195 } 2196 break 2197 } 2198 } 2199 2200 // WalkUint16Uint32MapDeterministic 有序遍历map 2201 // walkFunc 函数返回 false,停止遍历 2202 func WalkUint16Uint32MapDeterministic(in map[uint16]uint32, walkFunc func(k uint16, v uint32) bool) { 2203 var keys = make([]uint16, 0, len(in)) 2204 for k := range in { 2205 keys = append(keys, k) 2206 } 2207 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2208 for _, k := range keys { 2209 if walkFunc(k, in[k]) { 2210 continue 2211 } 2212 break 2213 } 2214 } 2215 2216 // WalkUint16Uint64MapDeterministic 有序遍历map 2217 // walkFunc 函数返回 false,停止遍历 2218 func WalkUint16Uint64MapDeterministic(in map[uint16]uint64, walkFunc func(k uint16, v uint64) bool) { 2219 var keys = make([]uint16, 0, len(in)) 2220 for k := range in { 2221 keys = append(keys, k) 2222 } 2223 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2224 for _, k := range keys { 2225 if walkFunc(k, in[k]) { 2226 continue 2227 } 2228 break 2229 } 2230 } 2231 2232 // WalkUint16Uint8MapDeterministic 有序遍历map 2233 // walkFunc 函数返回 false,停止遍历 2234 func WalkUint16Uint8MapDeterministic(in map[uint16]uint8, walkFunc func(k uint16, v uint8) bool) { 2235 var keys = make([]uint16, 0, len(in)) 2236 for k := range in { 2237 keys = append(keys, k) 2238 } 2239 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2240 for _, k := range keys { 2241 if walkFunc(k, in[k]) { 2242 continue 2243 } 2244 break 2245 } 2246 } 2247 2248 // WalkUint32Float32MapDeterministic 有序遍历map 2249 // walkFunc 函数返回 false,停止遍历 2250 func WalkUint32Float32MapDeterministic(in map[uint32]float32, walkFunc func(k uint32, v float32) bool) { 2251 var keys = make([]uint32, 0, len(in)) 2252 for k := range in { 2253 keys = append(keys, k) 2254 } 2255 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2256 for _, k := range keys { 2257 if walkFunc(k, in[k]) { 2258 continue 2259 } 2260 break 2261 } 2262 } 2263 2264 // WalkUint32Float64MapDeterministic 有序遍历map 2265 // walkFunc 函数返回 false,停止遍历 2266 func WalkUint32Float64MapDeterministic(in map[uint32]float64, walkFunc func(k uint32, v float64) bool) { 2267 var keys = make([]uint32, 0, len(in)) 2268 for k := range in { 2269 keys = append(keys, k) 2270 } 2271 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2272 for _, k := range keys { 2273 if walkFunc(k, in[k]) { 2274 continue 2275 } 2276 break 2277 } 2278 } 2279 2280 // WalkUint32IntMapDeterministic 有序遍历map 2281 // walkFunc 函数返回 false,停止遍历 2282 func WalkUint32IntMapDeterministic(in map[uint32]int, walkFunc func(k uint32, v int) bool) { 2283 var keys = make([]uint32, 0, len(in)) 2284 for k := range in { 2285 keys = append(keys, k) 2286 } 2287 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2288 for _, k := range keys { 2289 if walkFunc(k, in[k]) { 2290 continue 2291 } 2292 break 2293 } 2294 } 2295 2296 // WalkUint32Int16MapDeterministic 有序遍历map 2297 // walkFunc 函数返回 false,停止遍历 2298 func WalkUint32Int16MapDeterministic(in map[uint32]int16, walkFunc func(k uint32, v int16) bool) { 2299 var keys = make([]uint32, 0, len(in)) 2300 for k := range in { 2301 keys = append(keys, k) 2302 } 2303 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2304 for _, k := range keys { 2305 if walkFunc(k, in[k]) { 2306 continue 2307 } 2308 break 2309 } 2310 } 2311 2312 // WalkUint32Int32MapDeterministic 有序遍历map 2313 // walkFunc 函数返回 false,停止遍历 2314 func WalkUint32Int32MapDeterministic(in map[uint32]int32, walkFunc func(k uint32, v int32) bool) { 2315 var keys = make([]uint32, 0, len(in)) 2316 for k := range in { 2317 keys = append(keys, k) 2318 } 2319 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2320 for _, k := range keys { 2321 if walkFunc(k, in[k]) { 2322 continue 2323 } 2324 break 2325 } 2326 } 2327 2328 // WalkUint32Int64MapDeterministic 有序遍历map 2329 // walkFunc 函数返回 false,停止遍历 2330 func WalkUint32Int64MapDeterministic(in map[uint32]int64, walkFunc func(k uint32, v int64) bool) { 2331 var keys = make([]uint32, 0, len(in)) 2332 for k := range in { 2333 keys = append(keys, k) 2334 } 2335 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2336 for _, k := range keys { 2337 if walkFunc(k, in[k]) { 2338 continue 2339 } 2340 break 2341 } 2342 } 2343 2344 // WalkUint32Int8MapDeterministic 有序遍历map 2345 // walkFunc 函数返回 false,停止遍历 2346 func WalkUint32Int8MapDeterministic(in map[uint32]int8, walkFunc func(k uint32, v int8) bool) { 2347 var keys = make([]uint32, 0, len(in)) 2348 for k := range in { 2349 keys = append(keys, k) 2350 } 2351 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2352 for _, k := range keys { 2353 if walkFunc(k, in[k]) { 2354 continue 2355 } 2356 break 2357 } 2358 } 2359 2360 // WalkUint32InterfaceMapDeterministic 有序遍历map 2361 // walkFunc 函数返回 false,停止遍历 2362 func WalkUint32InterfaceMapDeterministic(in map[uint32]interface{}, walkFunc func(k uint32, v interface{}) bool) { 2363 var keys = make([]uint32, 0, len(in)) 2364 for k := range in { 2365 keys = append(keys, k) 2366 } 2367 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2368 for _, k := range keys { 2369 if walkFunc(k, in[k]) { 2370 continue 2371 } 2372 break 2373 } 2374 } 2375 2376 // WalkUint32StringMapDeterministic 有序遍历map 2377 // walkFunc 函数返回 false,停止遍历 2378 func WalkUint32StringMapDeterministic(in map[uint32]string, walkFunc func(k uint32, v string) bool) { 2379 var keys = make([]uint32, 0, len(in)) 2380 for k := range in { 2381 keys = append(keys, k) 2382 } 2383 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2384 for _, k := range keys { 2385 if walkFunc(k, in[k]) { 2386 continue 2387 } 2388 break 2389 } 2390 } 2391 2392 // WalkUint32UintMapDeterministic 有序遍历map 2393 // walkFunc 函数返回 false,停止遍历 2394 func WalkUint32UintMapDeterministic(in map[uint32]uint, walkFunc func(k uint32, v uint) bool) { 2395 var keys = make([]uint32, 0, len(in)) 2396 for k := range in { 2397 keys = append(keys, k) 2398 } 2399 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2400 for _, k := range keys { 2401 if walkFunc(k, in[k]) { 2402 continue 2403 } 2404 break 2405 } 2406 } 2407 2408 // WalkUint32Uint16MapDeterministic 有序遍历map 2409 // walkFunc 函数返回 false,停止遍历 2410 func WalkUint32Uint16MapDeterministic(in map[uint32]uint16, walkFunc func(k uint32, v uint16) bool) { 2411 var keys = make([]uint32, 0, len(in)) 2412 for k := range in { 2413 keys = append(keys, k) 2414 } 2415 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2416 for _, k := range keys { 2417 if walkFunc(k, in[k]) { 2418 continue 2419 } 2420 break 2421 } 2422 } 2423 2424 // WalkUint32Uint32MapDeterministic 有序遍历map 2425 // walkFunc 函数返回 false,停止遍历 2426 func WalkUint32Uint32MapDeterministic(in map[uint32]uint32, walkFunc func(k uint32, v uint32) bool) { 2427 var keys = make([]uint32, 0, len(in)) 2428 for k := range in { 2429 keys = append(keys, k) 2430 } 2431 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2432 for _, k := range keys { 2433 if walkFunc(k, in[k]) { 2434 continue 2435 } 2436 break 2437 } 2438 } 2439 2440 // WalkUint32Uint64MapDeterministic 有序遍历map 2441 // walkFunc 函数返回 false,停止遍历 2442 func WalkUint32Uint64MapDeterministic(in map[uint32]uint64, walkFunc func(k uint32, v uint64) bool) { 2443 var keys = make([]uint32, 0, len(in)) 2444 for k := range in { 2445 keys = append(keys, k) 2446 } 2447 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2448 for _, k := range keys { 2449 if walkFunc(k, in[k]) { 2450 continue 2451 } 2452 break 2453 } 2454 } 2455 2456 // WalkUint32Uint8MapDeterministic 有序遍历map 2457 // walkFunc 函数返回 false,停止遍历 2458 func WalkUint32Uint8MapDeterministic(in map[uint32]uint8, walkFunc func(k uint32, v uint8) bool) { 2459 var keys = make([]uint32, 0, len(in)) 2460 for k := range in { 2461 keys = append(keys, k) 2462 } 2463 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2464 for _, k := range keys { 2465 if walkFunc(k, in[k]) { 2466 continue 2467 } 2468 break 2469 } 2470 } 2471 2472 // WalkUint64Float32MapDeterministic 有序遍历map 2473 // walkFunc 函数返回 false,停止遍历 2474 func WalkUint64Float32MapDeterministic(in map[uint64]float32, walkFunc func(k uint64, v float32) bool) { 2475 var keys = make([]uint64, 0, len(in)) 2476 for k := range in { 2477 keys = append(keys, k) 2478 } 2479 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2480 for _, k := range keys { 2481 if walkFunc(k, in[k]) { 2482 continue 2483 } 2484 break 2485 } 2486 } 2487 2488 // WalkUint64Float64MapDeterministic 有序遍历map 2489 // walkFunc 函数返回 false,停止遍历 2490 func WalkUint64Float64MapDeterministic(in map[uint64]float64, walkFunc func(k uint64, v float64) bool) { 2491 var keys = make([]uint64, 0, len(in)) 2492 for k := range in { 2493 keys = append(keys, k) 2494 } 2495 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2496 for _, k := range keys { 2497 if walkFunc(k, in[k]) { 2498 continue 2499 } 2500 break 2501 } 2502 } 2503 2504 // WalkUint64IntMapDeterministic 有序遍历map 2505 // walkFunc 函数返回 false,停止遍历 2506 func WalkUint64IntMapDeterministic(in map[uint64]int, walkFunc func(k uint64, v int) bool) { 2507 var keys = make([]uint64, 0, len(in)) 2508 for k := range in { 2509 keys = append(keys, k) 2510 } 2511 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2512 for _, k := range keys { 2513 if walkFunc(k, in[k]) { 2514 continue 2515 } 2516 break 2517 } 2518 } 2519 2520 // WalkUint64Int16MapDeterministic 有序遍历map 2521 // walkFunc 函数返回 false,停止遍历 2522 func WalkUint64Int16MapDeterministic(in map[uint64]int16, walkFunc func(k uint64, v int16) bool) { 2523 var keys = make([]uint64, 0, len(in)) 2524 for k := range in { 2525 keys = append(keys, k) 2526 } 2527 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2528 for _, k := range keys { 2529 if walkFunc(k, in[k]) { 2530 continue 2531 } 2532 break 2533 } 2534 } 2535 2536 // WalkUint64Int32MapDeterministic 有序遍历map 2537 // walkFunc 函数返回 false,停止遍历 2538 func WalkUint64Int32MapDeterministic(in map[uint64]int32, walkFunc func(k uint64, v int32) bool) { 2539 var keys = make([]uint64, 0, len(in)) 2540 for k := range in { 2541 keys = append(keys, k) 2542 } 2543 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2544 for _, k := range keys { 2545 if walkFunc(k, in[k]) { 2546 continue 2547 } 2548 break 2549 } 2550 } 2551 2552 // WalkUint64Int64MapDeterministic 有序遍历map 2553 // walkFunc 函数返回 false,停止遍历 2554 func WalkUint64Int64MapDeterministic(in map[uint64]int64, walkFunc func(k uint64, v int64) bool) { 2555 var keys = make([]uint64, 0, len(in)) 2556 for k := range in { 2557 keys = append(keys, k) 2558 } 2559 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2560 for _, k := range keys { 2561 if walkFunc(k, in[k]) { 2562 continue 2563 } 2564 break 2565 } 2566 } 2567 2568 // WalkUint64Int8MapDeterministic 有序遍历map 2569 // walkFunc 函数返回 false,停止遍历 2570 func WalkUint64Int8MapDeterministic(in map[uint64]int8, walkFunc func(k uint64, v int8) bool) { 2571 var keys = make([]uint64, 0, len(in)) 2572 for k := range in { 2573 keys = append(keys, k) 2574 } 2575 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2576 for _, k := range keys { 2577 if walkFunc(k, in[k]) { 2578 continue 2579 } 2580 break 2581 } 2582 } 2583 2584 // WalkUint64InterfaceMapDeterministic 有序遍历map 2585 // walkFunc 函数返回 false,停止遍历 2586 func WalkUint64InterfaceMapDeterministic(in map[uint64]interface{}, walkFunc func(k uint64, v interface{}) bool) { 2587 var keys = make([]uint64, 0, len(in)) 2588 for k := range in { 2589 keys = append(keys, k) 2590 } 2591 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2592 for _, k := range keys { 2593 if walkFunc(k, in[k]) { 2594 continue 2595 } 2596 break 2597 } 2598 } 2599 2600 // WalkUint64StringMapDeterministic 有序遍历map 2601 // walkFunc 函数返回 false,停止遍历 2602 func WalkUint64StringMapDeterministic(in map[uint64]string, walkFunc func(k uint64, v string) bool) { 2603 var keys = make([]uint64, 0, len(in)) 2604 for k := range in { 2605 keys = append(keys, k) 2606 } 2607 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2608 for _, k := range keys { 2609 if walkFunc(k, in[k]) { 2610 continue 2611 } 2612 break 2613 } 2614 } 2615 2616 // WalkUint64UintMapDeterministic 有序遍历map 2617 // walkFunc 函数返回 false,停止遍历 2618 func WalkUint64UintMapDeterministic(in map[uint64]uint, walkFunc func(k uint64, v uint) bool) { 2619 var keys = make([]uint64, 0, len(in)) 2620 for k := range in { 2621 keys = append(keys, k) 2622 } 2623 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2624 for _, k := range keys { 2625 if walkFunc(k, in[k]) { 2626 continue 2627 } 2628 break 2629 } 2630 } 2631 2632 // WalkUint64Uint16MapDeterministic 有序遍历map 2633 // walkFunc 函数返回 false,停止遍历 2634 func WalkUint64Uint16MapDeterministic(in map[uint64]uint16, walkFunc func(k uint64, v uint16) bool) { 2635 var keys = make([]uint64, 0, len(in)) 2636 for k := range in { 2637 keys = append(keys, k) 2638 } 2639 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2640 for _, k := range keys { 2641 if walkFunc(k, in[k]) { 2642 continue 2643 } 2644 break 2645 } 2646 } 2647 2648 // WalkUint64Uint32MapDeterministic 有序遍历map 2649 // walkFunc 函数返回 false,停止遍历 2650 func WalkUint64Uint32MapDeterministic(in map[uint64]uint32, walkFunc func(k uint64, v uint32) bool) { 2651 var keys = make([]uint64, 0, len(in)) 2652 for k := range in { 2653 keys = append(keys, k) 2654 } 2655 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2656 for _, k := range keys { 2657 if walkFunc(k, in[k]) { 2658 continue 2659 } 2660 break 2661 } 2662 } 2663 2664 // WalkUint64Uint64MapDeterministic 有序遍历map 2665 // walkFunc 函数返回 false,停止遍历 2666 func WalkUint64Uint64MapDeterministic(in map[uint64]uint64, walkFunc func(k uint64, v uint64) bool) { 2667 var keys = make([]uint64, 0, len(in)) 2668 for k := range in { 2669 keys = append(keys, k) 2670 } 2671 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2672 for _, k := range keys { 2673 if walkFunc(k, in[k]) { 2674 continue 2675 } 2676 break 2677 } 2678 } 2679 2680 // WalkUint64Uint8MapDeterministic 有序遍历map 2681 // walkFunc 函数返回 false,停止遍历 2682 func WalkUint64Uint8MapDeterministic(in map[uint64]uint8, walkFunc func(k uint64, v uint8) bool) { 2683 var keys = make([]uint64, 0, len(in)) 2684 for k := range in { 2685 keys = append(keys, k) 2686 } 2687 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2688 for _, k := range keys { 2689 if walkFunc(k, in[k]) { 2690 continue 2691 } 2692 break 2693 } 2694 } 2695 2696 // WalkUint8Float32MapDeterministic 有序遍历map 2697 // walkFunc 函数返回 false,停止遍历 2698 func WalkUint8Float32MapDeterministic(in map[uint8]float32, walkFunc func(k uint8, v float32) bool) { 2699 var keys = make([]uint8, 0, len(in)) 2700 for k := range in { 2701 keys = append(keys, k) 2702 } 2703 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2704 for _, k := range keys { 2705 if walkFunc(k, in[k]) { 2706 continue 2707 } 2708 break 2709 } 2710 } 2711 2712 // WalkUint8Float64MapDeterministic 有序遍历map 2713 // walkFunc 函数返回 false,停止遍历 2714 func WalkUint8Float64MapDeterministic(in map[uint8]float64, walkFunc func(k uint8, v float64) bool) { 2715 var keys = make([]uint8, 0, len(in)) 2716 for k := range in { 2717 keys = append(keys, k) 2718 } 2719 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2720 for _, k := range keys { 2721 if walkFunc(k, in[k]) { 2722 continue 2723 } 2724 break 2725 } 2726 } 2727 2728 // WalkUint8IntMapDeterministic 有序遍历map 2729 // walkFunc 函数返回 false,停止遍历 2730 func WalkUint8IntMapDeterministic(in map[uint8]int, walkFunc func(k uint8, v int) bool) { 2731 var keys = make([]uint8, 0, len(in)) 2732 for k := range in { 2733 keys = append(keys, k) 2734 } 2735 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2736 for _, k := range keys { 2737 if walkFunc(k, in[k]) { 2738 continue 2739 } 2740 break 2741 } 2742 } 2743 2744 // WalkUint8Int16MapDeterministic 有序遍历map 2745 // walkFunc 函数返回 false,停止遍历 2746 func WalkUint8Int16MapDeterministic(in map[uint8]int16, walkFunc func(k uint8, v int16) bool) { 2747 var keys = make([]uint8, 0, len(in)) 2748 for k := range in { 2749 keys = append(keys, k) 2750 } 2751 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2752 for _, k := range keys { 2753 if walkFunc(k, in[k]) { 2754 continue 2755 } 2756 break 2757 } 2758 } 2759 2760 // WalkUint8Int32MapDeterministic 有序遍历map 2761 // walkFunc 函数返回 false,停止遍历 2762 func WalkUint8Int32MapDeterministic(in map[uint8]int32, walkFunc func(k uint8, v int32) bool) { 2763 var keys = make([]uint8, 0, len(in)) 2764 for k := range in { 2765 keys = append(keys, k) 2766 } 2767 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2768 for _, k := range keys { 2769 if walkFunc(k, in[k]) { 2770 continue 2771 } 2772 break 2773 } 2774 } 2775 2776 // WalkUint8Int64MapDeterministic 有序遍历map 2777 // walkFunc 函数返回 false,停止遍历 2778 func WalkUint8Int64MapDeterministic(in map[uint8]int64, walkFunc func(k uint8, v int64) bool) { 2779 var keys = make([]uint8, 0, len(in)) 2780 for k := range in { 2781 keys = append(keys, k) 2782 } 2783 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2784 for _, k := range keys { 2785 if walkFunc(k, in[k]) { 2786 continue 2787 } 2788 break 2789 } 2790 } 2791 2792 // WalkUint8Int8MapDeterministic 有序遍历map 2793 // walkFunc 函数返回 false,停止遍历 2794 func WalkUint8Int8MapDeterministic(in map[uint8]int8, walkFunc func(k uint8, v int8) bool) { 2795 var keys = make([]uint8, 0, len(in)) 2796 for k := range in { 2797 keys = append(keys, k) 2798 } 2799 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2800 for _, k := range keys { 2801 if walkFunc(k, in[k]) { 2802 continue 2803 } 2804 break 2805 } 2806 } 2807 2808 // WalkUint8InterfaceMapDeterministic 有序遍历map 2809 // walkFunc 函数返回 false,停止遍历 2810 func WalkUint8InterfaceMapDeterministic(in map[uint8]interface{}, walkFunc func(k uint8, v interface{}) bool) { 2811 var keys = make([]uint8, 0, len(in)) 2812 for k := range in { 2813 keys = append(keys, k) 2814 } 2815 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2816 for _, k := range keys { 2817 if walkFunc(k, in[k]) { 2818 continue 2819 } 2820 break 2821 } 2822 } 2823 2824 // WalkUint8StringMapDeterministic 有序遍历map 2825 // walkFunc 函数返回 false,停止遍历 2826 func WalkUint8StringMapDeterministic(in map[uint8]string, walkFunc func(k uint8, v string) bool) { 2827 var keys = make([]uint8, 0, len(in)) 2828 for k := range in { 2829 keys = append(keys, k) 2830 } 2831 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2832 for _, k := range keys { 2833 if walkFunc(k, in[k]) { 2834 continue 2835 } 2836 break 2837 } 2838 } 2839 2840 // WalkUint8UintMapDeterministic 有序遍历map 2841 // walkFunc 函数返回 false,停止遍历 2842 func WalkUint8UintMapDeterministic(in map[uint8]uint, walkFunc func(k uint8, v uint) bool) { 2843 var keys = make([]uint8, 0, len(in)) 2844 for k := range in { 2845 keys = append(keys, k) 2846 } 2847 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2848 for _, k := range keys { 2849 if walkFunc(k, in[k]) { 2850 continue 2851 } 2852 break 2853 } 2854 } 2855 2856 // WalkUint8Uint16MapDeterministic 有序遍历map 2857 // walkFunc 函数返回 false,停止遍历 2858 func WalkUint8Uint16MapDeterministic(in map[uint8]uint16, walkFunc func(k uint8, v uint16) bool) { 2859 var keys = make([]uint8, 0, len(in)) 2860 for k := range in { 2861 keys = append(keys, k) 2862 } 2863 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2864 for _, k := range keys { 2865 if walkFunc(k, in[k]) { 2866 continue 2867 } 2868 break 2869 } 2870 } 2871 2872 // WalkUint8Uint32MapDeterministic 有序遍历map 2873 // walkFunc 函数返回 false,停止遍历 2874 func WalkUint8Uint32MapDeterministic(in map[uint8]uint32, walkFunc func(k uint8, v uint32) bool) { 2875 var keys = make([]uint8, 0, len(in)) 2876 for k := range in { 2877 keys = append(keys, k) 2878 } 2879 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2880 for _, k := range keys { 2881 if walkFunc(k, in[k]) { 2882 continue 2883 } 2884 break 2885 } 2886 } 2887 2888 // WalkUint8Uint64MapDeterministic 有序遍历map 2889 // walkFunc 函数返回 false,停止遍历 2890 func WalkUint8Uint64MapDeterministic(in map[uint8]uint64, walkFunc func(k uint8, v uint64) bool) { 2891 var keys = make([]uint8, 0, len(in)) 2892 for k := range in { 2893 keys = append(keys, k) 2894 } 2895 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2896 for _, k := range keys { 2897 if walkFunc(k, in[k]) { 2898 continue 2899 } 2900 break 2901 } 2902 } 2903 2904 // WalkUint8Uint8MapDeterministic 有序遍历map 2905 // walkFunc 函数返回 false,停止遍历 2906 func WalkUint8Uint8MapDeterministic(in map[uint8]uint8, walkFunc func(k uint8, v uint8) bool) { 2907 var keys = make([]uint8, 0, len(in)) 2908 for k := range in { 2909 keys = append(keys, k) 2910 } 2911 sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) 2912 for _, k := range keys { 2913 if walkFunc(k, in[k]) { 2914 continue 2915 } 2916 break 2917 } 2918 }