I have between 1000-2000 webpages to download from one server, and I am using go routines and channels to achieve a high efficiency. The problem is that every time I run my
Still a golang newbie, hopefully this helps.
var netClient = &http.Client{} func init() { tr := &http.Transport{ MaxIdleConns: 20, MaxIdleConnsPerHost: 20, } netClient = &http.Client{Transport: tr} } func foo() { resp, err := netClient.Get("http://www.example.com/") }