bufwriter

package
v0.0.0-...-2aa3dc7 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer interface {
	io.Writer

	// Len returns the number of buffered bytes.
	Len() int

	// Flush writes any buffered data to the underlying writer.
	Flush() error

	// Reset discards the unwritten data, clears the error and sets a new destination.
	Reset(io.Writer)

	// Free frees the writer, releases its internal resources.
	Free()
}

Writer buffers small writes and flushes them to an underlying writer.

func New

func New(dst io.Writer) Writer

New returns a new buffered writer with the default buffer size.

func NewSize

func NewSize(dst io.Writer, size int) Writer

NewSize returns a new buffered writer with the specified buffer size.

Jump to

Keyboard shortcuts

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