Skip to content

Commit 9ba0cfe

Browse files
committed
shuffle to generic
1 parent f019530 commit 9ba0cfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

random.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func String(n int) string {
5656
return string(Bytes(n))
5757
}
5858

59-
func Shuffle(v []string) []string {
59+
func Shuffle[T any](v []T) []T {
6060
rnd, ok := pool.Get().(*rand.Rand)
6161
if !ok {
6262
rnd = createRand()

0 commit comments

Comments
 (0)