Skip to content

Instantly share code, notes, and snippets.

@yaegashi
yaegashi / exercise-web-crawler.go
Created March 19, 2016 09:34
My solution for web crawler exercise in Go tour: http://tour.golang.org/concurrency/10
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)