randoms

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextBytes

func NextBytes(count int) []byte

NextBytes creates an array of random bytes.

func NextFloat32

func NextFloat32() float32

NextFloat32 returns the next float32.

func NextFloat32Bounded

func NextFloat32Bounded(start float32, end float32) float32

NextFloat32Bounded returns the next float32 bounded by start and end.

func NextFloat64

func NextFloat64() float64

NextFloat64 returns the next float64.

func NextFloat64Bounded

func NextFloat64Bounded(start float64, end float64) float64

NextFloat64Bounded returns the next float64 bounded by start and end.

func NextInt

func NextInt() int

NextInt returns the next int.

func NextIntBounded

func NextIntBounded(start int, end int) int

NextIntBounded returns the next int bounded by start and end.

func NextIntUpperBounded

func NextIntUpperBounded(end int) int

NextIntUpperBounded returns the next int bounded by a maximum.

func Seed

func Seed()

Seed inits the random seed using the current UTC Unix Nano time.

func Uniqid

func Uniqid(length int) int64

Uniqid 随机数,length是需要返回的长度,只支持10~19位

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL