Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomBytes ¶
RandomBytes returns a generated bytes with the provided length.
Solution based on SO thread: http://stackoverflow.com/a/31832326/1590256
func RandomString ¶
RandomString returns a genrated string with the provided length.
func SecureToken ¶
SecureToken returns a securely generated random string.
It will error if the system's secure random number generator fails.
Types ¶
type RandPercentageFunc ¶
type RandPercentageFunc func() int
RandPercentageFunc is the integer returned by RandomInt() which represents the rollout percentage
func RandPercentage ¶
func RandPercentage(r *rand.Rand) RandPercentageFunc
RandPercentage returns a RandPercentage func that generates int in the range [min, max]
Click to show internal directories.
Click to hide internal directories.