shuffle icon link batches before putting them in the channel
This commit is contained in:
parent
27203ff085
commit
cd896427eb
1 changed files with 4 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
@ -137,6 +138,9 @@ func main() {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rand.Shuffle(len(icons), func(i, j int) {
|
||||||
|
icons[i], icons[j] = icons[j], icons[i]
|
||||||
|
})
|
||||||
for _, icon := range icons {
|
for _, icon := range icons {
|
||||||
iconCh <- icon
|
iconCh <- icon
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue