Documentation
¶
Index ¶
- Constants
- func Rand(length int) string
- func String(lo, up, nums, special bool, length int) string
- func StringLower() string
- func StringLowers(length int) string
- func StringNum() string
- func StringNums(length int) string
- func StringOf(length int, funcs ...func() string) string
- func StringSet(set string) string
- func StringSpecial() string
- func StringSpecials(length int) string
- func StringUpper() string
- func StringUppers(length int) string
Constants ¶
const ( // PasswordSet is a common special character set used in passwords. // < and > may cause issues on some systems. PasswordSet = " !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" )
Variables ¶
This section is empty.
Functions ¶
func String ¶ added in v0.2.0
String returns a random string of "length". If "lo" includes lowercase letters. If "up" includes uppercase letters. If "num" includes numbers. If "special" includes password special characters.
func StringLower ¶ added in v0.2.0
func StringLower() string
StringLower returns a string containing a random lowercase letter.
func StringLowers ¶ added in v0.2.0
StringLowers returns a string of random lowercase letters of "length".
func StringNum ¶ added in v0.2.0
func StringNum() string
StringNum returns a string containing a single digit random number.
func StringNums ¶ added in v0.2.0
StringNums returns a string of random numbers of "length".
func StringOf ¶ added in v0.2.0
StringOf takes any number of functins returning a string and calls them randomly until resulting string is of specified length.
func StringSet ¶ added in v0.2.0
StringSet returns a single random character from the specified set.
func StringSpecial ¶ added in v0.2.0
func StringSpecial() string
StringSpecial returns a string containing a random password special character.
func StringSpecials ¶ added in v0.2.0
StringSpecials returns a string of random special characters of "length".
func StringUpper ¶ added in v0.2.0
func StringUpper() string
StringUpper returns a string containing a random uppercase letter.
func StringUppers ¶ added in v0.2.0
StringUppers returns a string of random uppercase letters of "length".
Types ¶
This section is empty.