package main
import (
"fmt"
)
func main() {
done := make(chan bool)
hellos := make(chan string)
go func() {
for i := 0; i < 10; i++ {
hellos <- "Hello World"
}
done <- true
}()
go func() {
for {
select {
case hello := <-hellos:
fmt.Println(hello)
}
}
}()
<-done
}
superdecimal Goto Github PK
Name: Paris Goudas
Type: User
Bio: Software is still hungry!
Location: London - UK