实例
func channelDemo() { c := make(chan int) go func() { for { s := <-c fmt.Println(s) } }() c <- 1 c <- 2 time.Sleep(time.Millisecond) }