grand

package
v0.0.0-...-04ff805 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int

func Int(min, max int) int

Returns an int >= min, <= max

func RandomBool

func RandomBool() bool

func RandomBuffer

func RandomBuffer(buf []byte) (int, error)

func RandomFloat

func RandomFloat(min, max, decimalPoint int) float64

func RandomInt

func RandomInt(min, max int) int

Note: min & max are included in random output.

func RandomPassword

func RandomPassword(chars string, minLen, maxLen int) string

func RandomSimplePassword

func RandomSimplePassword(minLen, maxLen int) string

func RandomString

func RandomString(size int) string

Types

type Ranges

type Ranges struct {
	// contains filtered or unexported fields
}

func NewRanges

func NewRanges() *Ranges

func (*Ranges) Allow

func (r *Ranges) Allow(min, max rune) *Ranges

func (*Ranges) AllowRune

func (r *Ranges) AllowRune(a rune) *Ranges

func (*Ranges) Generate

func (r *Ranges) Generate(length uint64) string

Jump to

Keyboard shortcuts

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