Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Randomizer ¶
func (*Randomizer) Bytes ¶
func (r *Randomizer) Bytes(n int) ([]byte, error)
Bytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func (*Randomizer) Number ¶
func (r *Randomizer) Number(n int) int
Number generates a number between 0 and n
func (*Randomizer) NumberBetween ¶
func (r *Randomizer) NumberBetween(n int, m int) int
NumberBetween returns a random number between n and m
func (*Randomizer) Port ¶
func (r *Randomizer) Port() (int, error)
Port asks the kernel for an available port
Click to show internal directories.
Click to hide internal directories.