buffer

package standard library
go1.22.8 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 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 adapted from 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