go-shuffle

时间:2024-03-27 05:04:50
【文件属性】:

文件名称:go-shuffle

文件大小:6KB

文件格式:ZIP

更新时间:2024-03-27 05:04:50

Go

洗牌 软件包混洗提供了用于对切片和用户定义的集合进行混洗的原语。 import "github.com/shogo82148/go-shuffle" // Shuffle slice of int. ints := [] int { 3 , 1 , 4 , 1 , 5 , 9 } shuffle . Ints ( ints ) // Shuffle slice of int64. int64s := [] int64 { 3 , 1 , 4 , 1 , 5 , 9 } shuffle . Int64s ( int64s ) // Shuffle slice of string. strings := [] string { "foo" , "bar" } shuffle . Strings ( strings ) // Shuffle slice of float64. float64


【文件预览】:
go-shuffle-main
----shuffle.go(910B)
----shuffle_go17_test.go(1KB)
----shuffle_test.go(709B)
----shuffle_slice_test.go(1KB)
----shuffle_slice_g1.9.go(523B)
----shuffle_slice.go(404B)
----interface.go(1KB)
----.travis.yml(277B)
----LICENSE.md(1KB)
----README.md(907B)
----shuffle_go1.9.go(1KB)

网友评论