Skip to content

winterssy/bufferpool

Repository files navigation

bufferpool

bufferpool provides a pool of byte buffers, inspired by uber-go/zap .

Build codecov Go Report Card GoDoc License

Install

go get -u github.com/winterssy/bufferpool

Usage

import "github.com/winterssy/bufferpool"

Quick Start

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
}

License

MIT

Releases

No releases published

Packages

No packages published

Languages