bufpool

package
v0.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultSize = 8192

Variables

View Source
var Default = New(DefaultSize)
View Source
var DefaultStrings = NewStrings()

Functions

func Get

func Get() *bytes.Buffer

func GetBuilder

func GetBuilder() *strings.Builder

func New

func New(size int) *bufferPool

func NewStrings

func NewStrings() *stringsPool

func Put

func Put(buf *bytes.Buffer)

func PutBuilder

func PutBuilder(builder *strings.Builder)

Types

type BuilderPool

type BuilderPool interface {
	Get() *strings.Builder
	Put(*strings.Builder)
}

type Pool

type Pool interface {
	Get() *bytes.Buffer
	Put(*bytes.Buffer)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL