github.com/traefik/yaegi@v0.15.1/_test/select6.go (about) 1 package main 2 3 type T struct { 4 c1 chan string 5 } 6 7 func main() { 8 t := &T{} 9 t.c1 = make(chan string) 10 11 go func(c chan string) { c <- "done" }(t.c1) 12 13 select { 14 case <-t.c1: 15 println("received from c1") 16 } 17 println("Bye") 18 } 19 20 // Output: 21 // received from c1 22 // Bye