Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RandString ¶
type RandString struct {
// contains filtered or unexported fields
}
RandString is not a secure random generator.
func Default ¶
func Default() *RandString
Default returns a new *RandString seeded with time.Now().UnixNano() and with charset of "1234567890abcdefghijklmnopqrstuvwxyz"
func NewRand ¶
func NewRand(source rand.Source, chars []rune) *RandString
NewRand returns a not secure random string generator.
func (*RandString) Generate ¶
func (r *RandString) Generate(n int) string
Generate generates a not secure random string with length n.
type StringGenerator ¶
StringGenerator generates a string with specified length
Click to show internal directories.
Click to hide internal directories.