Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Based on Fisher-Yates algorithm
- func shuffleRecipients(shuffle []*data.Recipient) {
- rand.Seed(time.Now().UnixNano())
- for n := len(shuffle) - 1; n > 0; n-- {
- j := rand.Intn(n + 1)
- shuffle[n], shuffle[j] = shuffle[j], shuffle[n]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement