bufferpool

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Put

func Put(buf *Buffer)

Types

type Buffer

type Buffer struct {
	*bytes.Buffer
	// contains filtered or unexported fields
}

func Get

func Get() *Buffer

func (*Buffer) Free

func (b *Buffer) Free()

Free returns the Buffer to its Pool (alias for Release)

Callers must not retain references to the Buffer after calling Free.

func (*Buffer) Release

func (b *Buffer) Release()

Release returns the Buffer to its pool.

Callers must not retain references to the Buffer after calling Free.

func (*Buffer) TrimNewline

func (b *Buffer) TrimNewline()

TrimNewline trims any final "\n" byte from the end of the buffer.

Jump to

Keyboard shortcuts

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