Make your app 4x faster.
resp, err := http.Get(blah)
if err != nil {
return err
}
defer resp.Body.Close()
json.NewDecoder(resp.Body).Decode(&data)
resp, err := http.Get(blah)
if err != nil {
return err
}
defer drainclose.Close(resp.Body)
json.NewDecoder(resp.Body).Decode(&data)
MIT
Yasuhiro Matsumoto (a.k.a mattn)