Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Alphabets gets the a to z and A to Z Alphabets = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" // Digits gets 0 to 9 Digits = "0123456789" // AlphabetNumerics gets Alphabets and Digits AlphabetNumerics = Alphabets + Digits // Symbols gets the ascii symbols Symbols = "~!@#$%^&*()-_+={}[]\\|<,>.?/\"';:`" // ASCII gets the ascii characters ASCII = AlphabetNumerics + Symbols )
var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HiresRandomizer ¶
type HiresRandomizer interface { HiresNext() uint64 HiresNextIn(max uint64) uint64 HiresNextInRange(min, max uint64) uint64 }
HiresRandomizer enables high resolution randomizer
type Randomizer ¶
type Randomizer interface { Next() int NextIn(max int) int NextInRange(min, max int) int AsHires() HiresRandomizer AsStrings() StringsRandomizer }
Randomizer enables normal resolution randomizer
type StringsRandomizer ¶ added in v1.7.33
type StringsRandomizer interface { // NextStringSimple returns a random string with specified length 'n', just in A..Z NextStringSimple(n int) string // NextString returns a random string with specified length 'n' NextString(n int) string NextStringByCharset(n int, charset []rune) string NextStringWithVariantLength() string NextStringWithVariantLengthRange(min, max int) string NextStringWithVariantLengthByCharset(min, max int, charset []rune) string }
StringsRandomizer interface
Click to show internal directories.
Click to hide internal directories.