Documentation ¶ Index ¶ func Drain[T any](t TestT, data []T, ch <-chan T) type TestT Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Drain ¶ func Drain[T any](t TestT, data []T, ch <-chan T) Drain expects to receive data in order from ch, then expects ch to be closed. The channel must already be filled with the expected data. This will not work if the producer is still sending when this is called. Types ¶ type TestT ¶ type TestT interface { Log(...any) Logf(string, ...any) Error(...any) Errorf(string, ...any) // also used by testify/assert } Source Files ¶ View all Source files drain.go Click to show internal directories. Click to hide internal directories.