> For the complete documentation index, see [llms.txt](https://go.netdpi.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://go.netdpi.net/next/14.01-yue-du-da-shi-zuo-pin.md).

# 14.01-閱讀大師作品

若要成為一個好的藝術者或作家，至少都要研究大師的作品。這點在程式設計也是一樣的。要成為技術高超的程式設計師，其中一個最佳的方式就是研究別人撰寫的程式原始碼。Go 語言非常適任，因為整個專案（project）的程式原始碼都可以自由免費取得。

例如，我們可能想要看看 `io/ioutil` 函式庫的程式碼，則可以參考：

[http://golang.org/src/pkg/io/ioutil/ioutil.go](https://web.archive.org/web/20200228062158/http://golang.org/src/pkg/io/ioutil/ioutil.go)

慢慢地謹慎閱讀程式碼，並試著了解每一行程式的意義並閱讀註解。例如，在 `ReadFile` method 中，有一行註解的內容如下所示：

```
// It's a good but not certain bet that FileInfo
// will tell us exactly how much to read, so
// let's try it but be prepared for the answer
// to be wrong.
```

這個 method 或許起初設計時比現在簡單許多。這是一個很棒的範例，可以知道程式如何在經過測試之後改進，以及為何對那些改變撰寫註解是很重要的。每個 packages 的程式碼都可以在此網址取得：

[http://golang.org/src/pkg/](https://web.archive.org/web/20200228062158/http://golang.org/src/pkg/)
