https://github.com/lestrrat-go/bufferpool
Very simple bytes.Buffer pool using sync.Pool
https://github.com/lestrrat-go/bufferpool
Last synced: 2 months ago
JSON representation
Very simple bytes.Buffer pool using sync.Pool
- Host: GitHub
- URL: https://github.com/lestrrat-go/bufferpool
- Owner: lestrrat-go
- License: mit
- Created: 2016-10-20T06:46:30.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2021-01-18T23:59:36.000Z (over 4 years ago)
- Last Synced: 2024-06-19T05:56:55.353Z (about 1 year ago)
- Language: Go
- Size: 5.86 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bufferpool
Very simple bytes.Buffer pool using sync.Pool.
[](https://travis-ci.org/lestrrat-go/bufferpool)
[](https://godoc.org/github.com/lestrrat-go/bufferpool)
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)// ...
}
```