万年素人からHackerへの道

万年素人が殴り書きするぜ。

WebをGolangでハマった

Codelab: Webアプリケーションを書いてみよう - golang.jp

ここを参考に初めた。

./wiki.go:28: loadPage redeclared in this block となってしまうので、 「func loadPage」は1つだけ書くことに注意。

func loadPage(title string) *Page {

から、

func loadPage(title string) (*Page, error) {

にすること。

ちなみに、「os.Error」はなくなったのか、 ./wiki.go:15: undefined: os.Errorが発生する。

Build error · Issue #1 · thoroc/go_starter_package · GitHub

を参考に「os.Error」を単なる「error」に置き換えた。 importから「"os"」を外しても問題ない。

The Way to Go: A Thorough Introduction to the Go Programming Language

The Way to Go: A Thorough Introduction to the Go Programming Language