Documentation ¶
Overview ¶
Package test implements some test helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTimeout = errors.New("timeout")
ErrTimeout is the error that is returned when something timed out
View Source
var TimeoutDefault = time.Second * 5
TimeoutDefault is the default timeout duration.
Functions ¶
func ChTimeout ¶
ChTimeout either returns value from passed channel or zero value of the channel and ErrTimeout
func GoTimeout ¶
GoTimeout runs passed function in a go routine and returns ErrTimeout when the function timed out
func GoTimeoutDur ¶
GoTimeoutDur runs passed function in a go routine and returns ErrTimeout when the function timed out
func NewTestLogger ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.