mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-13 01:02:28 +08:00
doc: add doc for RandUniqueIntSlice
This commit is contained in:
@@ -115,7 +115,8 @@ func UUIdV4() (string, error) {
|
||||
return fmt.Sprintf("%x-%x-%x-%x-%x", uuid[0:4], uuid[4:6], uuid[6:8], uuid[8:10], uuid[10:]), nil
|
||||
}
|
||||
|
||||
// RandUniqueIntSlice generate a slice of random int of length n that do not repeat
|
||||
// RandUniqueIntSlice generate a slice of random int of length n that do not repeat.
|
||||
// Play: todo
|
||||
func RandUniqueIntSlice(n, min, max int) []int {
|
||||
if min > max {
|
||||
return []int{}
|
||||
|
||||
Reference in New Issue
Block a user