Documentation ¶
Overview ¶
Package krand is a library for generating random strings, integers, floating point numbers.
Index ¶
Constants ¶
View Source
const ( R_NUM = 1 // only number R_UPPER = 2 // only capital letters R_LOWER = 4 // only lowercase letters R_All = 7 // numbers, upper and lower case letters )
nolint
Variables ¶
This section is empty.
Functions ¶
func Bytes ¶
Bytes generate random strings of any length of multiple types, default length is 6 if bytesLen is empty example: Bytes(R_ALL), Bytes(R_ALL, 16), Bytes(R_NUM|R_LOWER, 16)
func Float64 ¶
Float64 generates a random floating point number of the specified range size, Four types of passing references are supported, example: Float64(dpLength), Float64(dpLength, max), Float64(dpLength, min, max), Float64(dpLength, max, min), min<=random numbers<=max
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.