mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-11-13 17:36:12 +08:00
Update 14.3.md
This commit is contained in:
@@ -94,7 +94,7 @@ for {
|
|||||||
使用for-range语句来读取通道是更好的办法,因为这会自动检测通道是否关闭:
|
使用for-range语句来读取通道是更好的办法,因为这会自动检测通道是否关闭:
|
||||||
```go
|
```go
|
||||||
for input := range ch {
|
for input := range ch {
|
||||||
process(input)
|
process(input)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
阻塞和生产者-消费者模式:
|
阻塞和生产者-消费者模式:
|
||||||
|
|||||||
Reference in New Issue
Block a user