Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AlphabetNumeric = &RandomString{ layout: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", r: rand.New(rand.NewSource(time.Now().UnixNano())), mu: sync.Mutex{}, } Numeric = &RandomString{ layout: "0123456789", r: rand.New(rand.NewSource(time.Now().UnixNano())), mu: sync.Mutex{}, } )
Functions ¶
This section is empty.
Types ¶
type RandomString ¶
type RandomString struct {
// contains filtered or unexported fields
}
func (*RandomString) Generate ¶
func (c *RandomString) Generate(n int) []byte
func (*RandomString) Intn ¶
func (c *RandomString) Intn(n int) int
func (*RandomString) Uint32 ¶
func (c *RandomString) Uint32() uint32
Click to show internal directories.
Click to hide internal directories.