Debian Codegraph @

_test/select5.go

raw symbols SCIP
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 msg1 := <-t.c1:
15 println("received from c1:", msg1)
16 }
17 println("Bye")
18 }
19
20 // Output:
21 // received from c1: done
22 // Bye