Registry / utility / shogo82148-go-shuffle

shogo82148-go-shuffle

JSON →
library1.1.1gogounverified

Package shuffle provides primitives for shuffling slices and user-defined collections.

go get github.com/shogo82148/go-shuffle
INSTALL
IMPORT
SIG · SHOGO82148-GO-SHUF
S
shogo82148-go-shuffle
utilitygov1.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

shuffle
github.com/shogo82148/go-shuffle

Shuffle a slice of integers

package main import ( "fmt" "github.com/shogo82148/go-shuffle" ) func main() { s := []int{1, 2, 3, 4, 5} shuffle.Ints(s) fmt.Println(s) }
Debug
Known issues
breakingDeprecated in favor of math/rand.Shuffle since Go 1.10
fix
Use math/rand.Shuffle instead
affects: >=1.0.0
Upgrade
Version history
1.1.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources
shogo82148-go-shuffle — go get shogo82148-go-shuffle · libregistry