1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

feat: add RandUniqueIntSlice (#108)

This commit is contained in:
Liu Shuang
2023-06-07 11:33:37 +08:00
committed by GitHub
parent a8761eefb0
commit 850800a233
3 changed files with 68 additions and 0 deletions

View File

@@ -123,3 +123,14 @@ func ExampleUUIdV4() {
// Output:
// true
}
func ExampleRandUniqueIntSlice() {
result := RandUniqueIntSlice(5, 0, 10)
if len(result) == 5 {
fmt.Println("ok")
}
// Output:
// ok
}