mirror of
https://github.com/traefik/yaegi.git
synced 2026-06-01 18:37:56 +00:00
18 lines
218 B
Go
18 lines
218 B
Go
package main
|
|
|
|
func main() {
|
|
c1 := make(chan string)
|
|
|
|
go func() { c1 <- "done" }()
|
|
|
|
select {
|
|
case msg1 := <-c1:
|
|
println("received from c1:", msg1)
|
|
}
|
|
println("Bye")
|
|
}
|
|
|
|
// Output:
|
|
// received from c1: done
|
|
// Bye
|