Documentation
¶
Index ¶
- func CryptoRandIntInRange[T number.Integer](min, max T) (T, error)
- func Float64() (float64, error)
- func Int63() int64
- func Intn(n int) int
- func MustFloat64() float64
- func NewSeedInt64Crypto() (int64, error)
- func NewSeedInt64Time() (int64, error)
- func RandString(alphabet string, length uint) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CryptoRandIntInRange ¶ added in v0.69.3
CryptoRandIntInRange returns a cryptographically secure random integer in [min, max] (inclusive).
func Int63 ¶ added in v0.70.10
func Int63() int64
Int63 returns a non-negative pseudo-random 63-bit integer as an int64
func Intn ¶ added in v0.47.0
Intn returns a cryptographically secure random int in [0, n). It panics if n <= 0.
func MustFloat64 ¶ added in v0.68.10
func MustFloat64() float64
func NewSeedInt64Crypto ¶ added in v0.41.0
NewSeedInt64Crypto creates an `int64` seed value for `math/rand`. This is preferred over `NewSeedInt64Time()`. See: https://stackoverflow.com/a/54491783/1908967
func NewSeedInt64Time ¶ added in v0.41.0
NewSeedInt64Time creates an `int64` seed value for `math/rand`. This is preferred over `NewSeedInt64Crypto()`. See: https://stackoverflow.com/a/54491783/1908967
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.