Documentation ¶
Index ¶
Constants ¶
View Source
const ( Ldigit = 1 << iota LlowerCase LupperCase LlowerAndUpperCase = LlowerCase | LupperCase LdigitAndLowerCase = Ldigit | LlowerCase LdigitAndUpperCase = Ldigit | LupperCase LdigitAndLetter = Ldigit | LlowerCase | LupperCase )
define a flag that generates a random string
Variables ¶
View Source
var ( ErrInvalidLength = errors.New("invalid random length") ErrInvalidFlag = errors.New("invalid random flag") )
definition error
Functions ¶
func MustRandom ¶
MustRandom generate a random string specifying the length of the random number and the random flag (panic if an error occurs)
func MustShortStr ¶
MustShortStr get a set of short strings of length (panic if an error occurs)
func Random ¶
Random generate a random string specifying the length of the random number and the random flag
func UUID ¶
UUID generate a random UUID, reference: https://github.com/google/uuid/blob/master/version4.go
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.