Documentation ¶
Overview ¶
pcakage random provides methods for generating random strings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { // The length in bytes of the final string. Length int // The number of characters in the final string. Chars int // A boolean flag indicating that only ASCII characters be included in the final string. ASCII bool // A boolean flag indicating that only alphanumeric (a-zA-Z0-9) characters be included in the final string. AlphaNumeric bool // A boolean flag indicating the random string should be returned as a base32 encoded string. Base32 bool }
Options is a struct containing configuration options for the `String` method.
func DefaultOptions ¶
func DefaultOptions() *Options
DefaultOptions returns an `Options` instance with no limits or restrictions save a minimum length of 32 bytes.
Click to show internal directories.
Click to hide internal directories.