I am expecting this code to go in an infinite loop, sending and receiving the message. But it does not seem to either send or receive. Why?
go func() {
for {
select {
case ch1 <- 1:
println("sent 1 ")
case c := <-ch1:
println(" received ", c)
}
time.Sleep(time.Second)
}
}()