Go言語でgolang.jpのサンプルコード実装時に、パッケージ/関数/構造体が以前のバージョンのもので実装されていた場合の変更メモ。
執筆時に最新バージョン(1.6)で実装されているものとする。
今後、随時追記予定。
パッケージ
- http → net/http
- template→html/template
関数
- template.ParseFile→template.ParseFiles
template_sample.go
t := template.Must(template.ParseFiles("view.html"))
構造体
- os.Error → error