random

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRandom = rand.New(rand.NewSource(time.Now().UnixNano()))

Functions

func SetDefaultRandomSeed added in v0.8.3

func SetDefaultRandomSeed(seed int64)

Types

type Random

type Random struct {
	Random *rand.Rand
}

func New

func New(r *rand.Rand) Random

func (Random) Alpha

func (r Random) Alpha(n int) string

func (Random) AlphaNum

func (r Random) AlphaNum(n int) string

func (Random) Ascii

func (r Random) Ascii(n int) string

func (Random) Float

func (r Random) Float(min, max float64) float64

func (Random) Intn

func (r Random) Intn(min, max int) int

func (Random) Numeric

func (r Random) Numeric(n int) string

Jump to

Keyboard shortcuts

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