A Tour of Goの続き。 ツアーもこれで最後。 71.Exercise: Web Crawler 最後の課題らしく、コードは多め、解説は少なめ。 まず、初期のコード。 今までのサンプルコードよりボリュームがあるので、まずはしっかり読んでみる。 package main import ( "fmt" ) type Fetcher interface { // Fetch returns the body of URL and // a slice of URLs found on that page. Fetch(url string) (body string, urls []string, err error) } // Crawl uses fetcher to recursively crawl // pages starting with url, to a maximum