gopl-zh.github.com/exercise/ex-ch1-07.md
2015-12-09 15:57:17 +08:00

3 lines
305 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

**練習 1.7:** 函數調用io.Copy(dst, src)會從src中讀取內容併將讀到的結果寫入到dst中使用這個函數替代掉例子中的ioutil.ReadAll來拷貝響應結構體到os.Stdout避免申請一個緩衝區(例子中的b)來存儲。記得處理io.Copy返迴結果中的錯誤。