github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/talks/2012/concurrency/support/select.go (about) 1 // +build OMIT 2 3 package main 4 5 func main() { 6 var c1, c2, c3 chan int 7 // START0 OMIT 8 select { 9 case v1 := <-c1: 10 fmt.Printf("received %v from c1\n", v1) 11 case v2 := <-c2: 12 fmt.Printf("received %v from c2\n", v1) 13 case c3 <- 23: 14 fmt.Printf("sent %v to c3\n", 23) 15 default: 16 fmt.Printf("no one was ready to communicate\n") 17 } 18 // STOP0 OMIT 19 }