June 2017
Intermediate to advanced
400 pages
10h 32m
English
These steps cover writing and running your application:
package waitgroup import ( "fmt" "log" "net/http" "strings" "time" ) // GetURL gets a url, and logs the time it took func GetURL(url string) (*http.Response, error) { start := time.Now() log.Printf("getting %s", url) resp, err := http.Get(url) log.Printf("completed getting %s in %s", url, time.Since(start)) return resp, err } // CrawlError is our custom error type // ...Read now
Unlock full access