ch8: fix code format

This commit is contained in:
chai2010
2016-01-21 10:39:06 +08:00
parent 0b5ec941ed
commit b1730821fe
13 changed files with 393 additions and 404 deletions

View File

@@ -10,8 +10,8 @@
在8.3節的客戶端程序它在主goroutine中譯註就是執行main函數的goroutine將標準輸入複製到server因此當客戶端程序關閉標準輸入時後台goroutine可能依然在工作。我們需要讓主goroutine等待後台goroutine完成工作後再退出我們使用了一個channel來同步兩個goroutine
<u><i>gopl.io/ch8/netcat3</i></u>
```Go
gopl.io/ch8/netcat3
func main() {
conn, err := net.Dial("tcp", "localhost:8000")
if err != nil {