1
0
Fork 0
mirror of https://github.com/vbatts/talks.git synced 2024-11-16 05:28:37 +00:00
talks/2015/02-devconf.cz/ugly0.go

17 lines
185 B
Go
Raw Normal View History

2015-02-05 23:58:25 +00:00
// +build ignore
package main
func main() {
// START1 OMIT
c := make(chan int)
go func() {
for i := 0; i < 10; i++ {
c <- i
}
close(c)
}()
println(<-c)
// STOP1 OMIT
}