package main
import (
"fmt"
"time"
)
func sendData(sendch chan<- int) {
fmt.Println("go sendData", sendch)
sendch <- 10
//<-sendch
}
func readData(sendch <-chan int) {
//sendch <- 10
data := <-sendch
fmt.Println(data)
}
func main() {
chnl := make(chan int)
go sendData(chnl)
//readData(chnl)
go readData(chnl)
time.Sleep(time.Second*6)
}