Documentation ¶
Overview ¶
Package xrand provides helper functions for generating random numbers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bytes ¶
Bytes returns an amount of cryptographically-secure random bytes equal to the the specified size.
The bytes are generated using the crypto/rand package and will panic if crypto/rand fails to generate the requested amount of bytes.
Defaults to 32 if no size is specified.
Types ¶
type UUID ¶ added in v0.12.0
type UUID struct {
// contains filtered or unexported fields
}
UUID represents a 128-bit Universal Unique Identifier (UUID) as defined in RFC 4122.
func (*UUID) GenerateV4 ¶ added in v0.12.0
Generate generates a UUIDv4 and returns it as a string.
Click to show internal directories.
Click to hide internal directories.