sel

package
v0.6.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2024 License: Unlicense Imports: 3 Imported by: 0

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 any, send ...any) ([]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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL