bufreader

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package bufreader provides buffered reader-closer gadget.

Index

Constants

View Source
const (
	// DefaultBufferSize is used if bufSize is <= 0.
	DefaultBufferSize = 16 << 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader is a buffered reader-closer. It can be reused.

func New

func New(re io.ReadCloser, bufSize int) *Reader

New creates a new buffered reader.

func (*Reader) Reset

func (re *Reader) Reset(rc io.ReadCloser)

Reset sets internal state and forces Reader to use provided reader. Provided reader can be nil.

Jump to

Keyboard shortcuts

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