feat: add RandUniqueIntSlice (#108)

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

No files matched your search

+11
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
}