mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
feat: add RandUniqueIntSlice (#108)
This commit is contained in:
1 parent
a8761eefb0
commit
850800a233
3 files changed
+68
No files matched your search
@@ -123,3 +123,14 @@ func ExampleUUIdV4() {
|
||||
// Output:
|
||||
// true
|
||||
}
|
||||
|
||||
func ExampleRandUniqueIntSlice() {
|
||||
result := RandUniqueIntSlice(5, 0, 10)
|
||||
|
||||
if len(result) == 5 {
|
||||
fmt.Println("ok")
|
||||
}
|
||||
|
||||
// Output:
|
||||
// ok
|
||||
}
|
||||
Reference in new issue
Block a user