// 分别打印 a A b B c C ....
func main() {
ch := make(chan int)
go func(ch chan int) {
lowerCharFrom := 97
upCharFrom := 65
for i := 0; i < 26; i++ {
ch <- lowerCharFrom + i
ch <- upCharFrom + i
}
}(ch)
for v := range ch {
fmt.Println(string(v))
}
}
报错:fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan receive]: