Skip to content

Instantly share code, notes, and snippets.

@ysmood
Last active December 18, 2020 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ysmood/627ae2851bde609813d98282b0d578e9 to your computer and use it in GitHub Desktop.
Save ysmood/627ae2851bde609813d98282b0d578e9 to your computer and use it in GitHub Desktop.
Copy the names then run it, it will output to your clipboard, names should be separated by commas
package main
import (
"math/rand"
"strings"
"github.com/atotto/clipboard"
)
func main() {
input, _ := clipboard.ReadAll()
list := strings.Split(input, ",")
rand.Shuffle(len(list), func(i, j int) { list[i], list[j] = list[j], list[i] })
_ = clipboard.WriteAll(strings.Join(list, "\n"))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment