我填的0,为什么send出不来? func main() { var myChannel = make(chan int, (0)) var number = 6 go func() { var sender Sender = myChannel sender <- number fmt.Println("Sent!") }() go func() { var receiver Receiver = myChannel fmt.Println("Received!", <-receiver) }() time.Sleep(time.Second) }
哈哈。搞定了就好
已经解决,不必解答了哦