buffer

package standard library
go1.26.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation ΒΆ

Overview ΒΆ

Package buffer provides a pool-allocated byte buffer.

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

This section is empty.

Types ΒΆ

type Buffer ΒΆ

type Buffer []byte

Buffer is a byte buffer.

This implementation is adapted from the unexported type buffer in go/src/fmt/print.go.

func New ΒΆ

func New() *Buffer

func (*Buffer) Free ΒΆ

func (b *Buffer) Free()

func (*Buffer) Len ΒΆ added in go1.22.0

func (b *Buffer) Len() int

func (*Buffer) Reset ΒΆ

func (b *Buffer) Reset()

func (*Buffer) SetLen ΒΆ added in go1.22.0

func (b *Buffer) SetLen(n int)

func (*Buffer) String ΒΆ

func (b *Buffer) String() string

func (*Buffer) Write ΒΆ

func (b *Buffer) Write(p []byte) (int, error)

func (*Buffer) WriteByte ΒΆ

func (b *Buffer) WriteByte(c byte) error

func (*Buffer) WriteString ΒΆ

func (b *Buffer) WriteString(s string) (int, error)

Jump to

Keyboard shortcuts

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