Documentation
¶
Overview ¶
Package randutil contains utilities for random numbers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustNewSeed ¶
func MustNewSeed() (seed [32]byte)
MustNewSeed returns new 32-byte seed for pseudorandom generators.
Types ¶
type LockedSource ¶
type LockedSource struct {
// contains filtered or unexported fields
}
LockedSource is an implementation of rand.Source that is concurrency-safe.
func NewLockedSource ¶
func NewLockedSource(src rand.Source) (s *LockedSource)
NewLockedSource returns new properly initialized *LockedSource.
func (*LockedSource) Uint64 ¶
func (s *LockedSource) Uint64() (r uint64)
Uint64 implements the rand.Source interface for *LockedSource.
Click to show internal directories.
Click to hide internal directories.