Documentation ¶
Index ¶
- Constants
- func FromSet(set string, length int, rnd *rand.Rand) string
- func NonEmptyUTF8Printable(maxlength int, rnd *rand.Rand) string
- func RandomRuneUTF8FromRanges(tables []*unicode.RangeTable, rnd *rand.Rand) rune
- func RandomRuneUTF8Printable(rnd *rand.Rand) rune
- func ToRandomCase(input string, rnd *rand.Rand) string
- func URL(schema string, rnd *rand.Rand) string
- func UTF8FromRanges(length int, rnd *rand.Rand, tables ...*unicode.RangeTable) string
- func UTF8Printable(length uint64, rnd *rand.Rand) string
Constants ¶
const ( LatinUpper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" LatinLower = "abcdefghijklmnopqrstuvwxyz" Latin = LatinUpper + LatinLower Decimal = "0123456789" Hexadecimal = Decimal + "ABCDEF" Alphanumeric = Latin + Decimal Punctuation = ",.:;!?-" Bracket = "{}[]()" SpecCharsKbd = "`~!@#$%^&*()|" )
Variables ¶
This section is empty.
Functions ¶
func NonEmptyUTF8Printable ¶
NonEmptyUTF8Printable returns a random string of the length between 1 and maxlength comprised of printable UTF8 characters
func RandomRuneUTF8FromRanges ¶
func RandomRuneUTF8FromRanges(tables []*unicode.RangeTable, rnd *rand.Rand) rune
RandomRuneUTF8FromRanges returns a random rune in the given RangeTable.
func RandomRuneUTF8Printable ¶
RandomRuneUTF8Printable returns a random rune of a printable range.
func ToRandomCase ¶
ToRandomCase returns randomly cased(uppercase, lowercase or RaNDomcASe) input string or the input string without any changes
func URL ¶
URL returns a random URL string with given schema, 1-4 random subdomains and 0-5 subdirectories
func UTF8FromRanges ¶
UTF8FromRanges generates a random UTF8 string of a given character length that exists on the given RangeTables. For a list of valid RangeTables, see http://golang.org/pkg/unicode/#pkg-variables
Types ¶
This section is empty.