internal

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBytes

func GetBytes(n int) []byte

GetBytes returns a byte slice of at least n bytes from the pool.

func GetReader

func GetReader(rd io.Reader) *bufio.Reader

GetReader returns a reader from the pool and resets it to the provided reader.

func PutBytes

func PutBytes(b []byte)

PutBytes returns a byte slice to the pool.

func PutReader

func PutReader(r *bufio.Reader)

PutReader returns a reader to the pool and resets it.

Types

type BytesWriter

type BytesWriter struct {
	// contains filtered or unexported fields
}

BytesWriter is a simple wrapper around a byte slice that implements io.Writer.

func (*BytesWriter) Bytes

func (w *BytesWriter) Bytes() []byte

Bytes returns the written portion of the byte slice.

func (*BytesWriter) Init

func (w *BytesWriter) Init(buf []byte)

Init initializes the BytesWriter with a byte slice.

func (*BytesWriter) Write

func (w *BytesWriter) Write(p []byte) (int, error)

Write implements io.Writer.

Jump to

Keyboard shortcuts

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