bufwriter

package
v0.1.1-0...-1a35c7a Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package bufwriter provides a buffered writer gadget.

Index

Constants

View Source
const DefaultBufferSize = 16 << 10 // 16 Kb

DefaultBufferSize is used if buffers size is <= 0.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

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

Writer is a buffered io.Writer wrapper.

func New

func New(w io.WriteCloser, bufSize int) *Writer

New creates a new buffered writer. If bufSize <= 0, then DefaultBufferSize is used as internal buffer size.

func (*Writer) Close

func (wr *Writer) Close() error

Close flushes and closes underlying writer.

func (*Writer) Reset

func (wr *Writer) Reset(w io.WriteCloser)

Reset buffer and sets new write target.

Jump to

Keyboard shortcuts

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