Documentation ¶
Overview ¶
Package sel contains some utilities for working with select statements and channels (or structs of channels).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cases ¶
func Cases(dir reflect.SelectDir, mock interface{}, send ...interface{}) ([]reflect.SelectCase, error)
Cases takes either a mock struct (i.e. a struct of only channel fields) or a channel and returns a []reflect.SelectCase that may be used in reflect.Select calls. If dir is reflect.SelectSend, then send must contain exactly one value for each channel in mock.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.