random

package
v2.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntType added in v2.4.0

type IntType byte
const (
	IntNormal  IntType = iota
	IntUpto    IntType = iota
	IntBetween IntType = iota
)

type ValueGenerator

type ValueGenerator interface {
	String() string
	StringOfLen(length int) string
	Identifier() string
	IdentifierOfLen(length int) string
	Rune() rune
	Byte() byte
	Int() int
	IntUpto(max int) int
	IntBetween(min, max int) int
	Int64() int64
	Uint() uint
	Float32() float32
	Float64() float64
	Complex64() complex64
	Complex128() complex128
	Bool() bool
	Time() time.Time
	Duration() time.Duration

	// Get a value of any (supported) type
	Value(receiver any) error
}

type ValueGeneratorModifier added in v2.4.0

type ValueGeneratorModifier interface {
	ValueGenerator
	SetDefaultStringLength(length int) ValueGeneratorModifier
	SetDefaultSliceLength(length int) ValueGeneratorModifier
	SetDefaultIntNormal() ValueGeneratorModifier
	SetDefaultIntUpto(max int) ValueGeneratorModifier
	SetDefaultIntBetween(min, max int) ValueGeneratorModifier
}

func NewValueGenerator

func NewValueGenerator() ValueGeneratorModifier

Jump to

Keyboard shortcuts

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