forked from TrueCloudLab/frostfs-api-go
d35e935a9d
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
12 lines
204 B
Go
12 lines
204 B
Go
package internal
|
|
|
|
import (
|
|
"math/rand"
|
|
"time"
|
|
)
|
|
|
|
// RandUint32 returns random uint32 value [0, max).
|
|
func RandUint32(max uint32) uint32 {
|
|
rand.Seed(time.Now().UnixNano())
|
|
return rand.Uint32() % max
|
|
}
|