Documentation ¶
Index ¶
- func RandBetween(min int, max int) int
- func RandBetweenSecure(min int, max int) int
- func RandInt() int
- func RandInt32() int32
- func RandInt32Secure() int32
- func RandInt64() int64
- func RandInt64Secure() int64
- func RandIntSecure() int
- func RandUint() uint
- func RandUint32() uint32
- func RandUint32Secure() uint32
- func RandUint64() uint64
- func RandUint64Secure() uint64
- func RandUintSecure() uint
- func SetShuffleRand(f func(min int, max int) int)
- func Shuffle(ss Swapper)
- func SimpleRandBetween(min int, max int) int
- type Swapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandBetween ¶
RandBetween : generate rand between [a, b], return int
func RandBetweenSecure ¶
RandBetweenSecure : generate rand between [a, b], return int
func RandInt32 ¶
func RandInt32() int32
RandInt32 random generate int32, rand seed is current nano timestamp
func RandInt32Secure ¶
func RandInt32Secure() int32
RandInt32Secure random generate int32, read data from linux /dev/urandom actually, it's almost a random id
func RandInt64 ¶
func RandInt64() int64
RandInt64 random generate int64, rand seed is current nano timestamp
func RandInt64Secure ¶
func RandInt64Secure() int64
RandInt64Secure random generate int64, read data from linux /dev/urandom actually, it's almost a random id
func RandIntSecure ¶
func RandIntSecure() int
RandIntSecure random generate int, read data from linux /dev/urandom actually, it's almost a random id
func RandUint ¶
func RandUint() uint
RandUint random generate uint, rand seed is current nano timestamp
func RandUint32 ¶
func RandUint32() uint32
RandUint32 random generate uint32, rand seed is current nano timestamp
func RandUint32Secure ¶
func RandUint32Secure() uint32
RandUint32Secure random generate uint32, read data from linux /dev/urandom actually, it's almost a random id
func RandUint64 ¶
func RandUint64() uint64
RandUint64 random generate uint64, rand seed is current nano timestamp
func RandUint64Secure ¶
func RandUint64Secure() uint64
RandUint64Secure random generate uint64, read data from linux /dev/urandom actually, it's almost a random id
func RandUintSecure ¶
func RandUintSecure() uint
RandUintSecure random generate uint, read data from linux /dev/urandom actually, it's almost a random id
func SetShuffleRand ¶
SetShuffleRand : set shuffle rand function
func SimpleRandBetween ¶
SimpleRandBetween : generate rand between [a, b], use same global rand source: rand.Rand