lestrrat-go / bufferpool

Very simple bytes.Buffer pool using sync.Pool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bufferpool

Very simple bytes.Buffer pool using sync.Pool.

Build Status

GoDoc

I got tired of writing the same sync.Pool for byte.Buffer objects.

SYNOPSIS

import "github.com/lestrrat-go/bufferpool"

var pool = bufferpool.New()

func main() {
    buf := pool.Get()
    defer pool.Release(buf)

    // ...
}

About

Very simple bytes.Buffer pool using sync.Pool

License:MIT License


Languages

Language:Go 100.0%