1
0
Fork 0
mirror of https://github.com/vbatts/talks.git synced 2024-12-13 18:26:30 +00:00
talks/2015/06-devnation-golang-good-bad-ugly/ugly0.go

17 lines
185 B
Go
Raw Normal View History

2015-06-11 22:28:27 +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
}