Standard library / reflect
reflect.SelectDefault
Default case executes when no communication case is ready; Chan and Send must be invalid values. Expected stdout: '0 false false\n'.
Formal Syntax & Structure
go syntaxgo
const SelectDefault SelectDir = 3Working Example
Example Snippetgo
package main
import ( "fmt" "reflect")
func main() { i, x, ok := reflect.Select([]reflect.SelectCase{{Dir: reflect.SelectDefault}}) fmt.Println(i, x.IsValid(), ok)}