Documentation
¶
Overview ¶
Package random implements some basic functions to generate random int and string.
Index ¶
- Constants
- func RandBytes(length int) []byte
- func RandInt(min, max int) int
- func RandLower(length int) string
- func RandNumeral(length int) string
- func RandNumeralOrLetter(length int) string
- func RandString(length int) string
- func RandUniqueIntSlice(n, min, max int) []int
- func RandUpper(length int) string
- func UUIdV4() (string, error)
Constants ¶
View Source
const ( NUMERAL = "0123456789" LOWER_LETTERS = "abcdefghijklmnopqrstuvwxyz" UPPER_LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" LETTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" )
Variables ¶
This section is empty.
Functions ¶
func RandNumeral ¶ added in v1.3.3
RandNumeral generate a random numeral string
func RandNumeralOrLetter ¶ added in v1.3.3
RandNumeralOrLetter generate a random numeral or letter string
func RandUniqueIntSlice ¶ added in v1.4.0
RandUniqueIntSlice generate a slice of random int of length n that do not repeat.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.