No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
drainclose.go

README.md

go-drainclose

Make your app 4x faster.

See https://github.com/google/go-github/pull/317

Usage

Before

resp, err := http.Get(blah)
if err != nil {
	return err
}
defer resp.Body.Close()
json.NewDecoder(resp.Body).Decode(&data)

After

resp, err := http.Get(blah)
if err != nil {
	return err
}
defer drainclose.Close(resp.Body)
json.NewDecoder(resp.Body).Decode(&data)

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)