Very simple bytes.Buffer pool using sync.Pool.
I got tired of writing the same sync.Pool for byte.Buffer objects.
This repository has been moved to github.com/lestrrat-go/bufferpool. This repository exists so that libraries pointing to this URL will keep functioning, but this repository will NOT be updated in the future. Please use the new import path.
import "github.com/lestrrat/go-bufferpool"
var pool = bufferpool.New()
func main() {
buf := pool.Get()
defer pool.Release(buf)
// ...
}