mirror of
https://github.com/jimeh/rands.git
synced 2026-02-19 03:16:39 +00:00
Add equivalent to `Shuffle` function from `math/rand` and `math/rand/v2` packages, but based on randomness from `crypto/rand` package. This allows cryptographically secure shuffling of data. Also add `ShuffleSlice` function that shuffles a slice of any type. BREAKING CHANGE: Minimum required Go version is now 1.18 due the `ShuffleSlice` using generics.
12 lines
231 B
Modula-2
12 lines
231 B
Modula-2
module github.com/jimeh/rands
|
|
|
|
go 1.18
|
|
|
|
require github.com/stretchr/testify v1.10.0
|
|
|
|
require (
|
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
)
|