bufferpool provides a pool of byte buffers, inspired by uber-go/zap .
go get -u github.com/winterssy/bufferpool
import "github.com/winterssy/bufferpool"
package main
import (
"fmt"
"github.com/winterssy/bufferpool"
)
func main() {
const dummyData = "hello world"
buf := bufferpool.Get()
defer buf.Free()
buf.WriteString(dummyData)
fmt.Println(buf.String())
// Output:
// hello world
}