xio

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: MPL-2.0 Imports: 2 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseIgnoringErrors

func CloseIgnoringErrors(closer io.Closer)

CloseIgnoringErrors closes the closer and ignores any error it might produce. Should only be used for read-only streams of data where closing should never cause an error.

Types

type LineWriter

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

LineWriter buffers its input into lines before sending each line to an output function without the trailing line feed.

func NewLineWriter

func NewLineWriter(out func([]byte)) *LineWriter

NewLineWriter creates a new LineWriter.

func (*LineWriter) Close

func (w *LineWriter) Close() error

Close implements the io.Closer interface.

func (*LineWriter) Write

func (w *LineWriter) Write(data []byte) (n int, err error)

Write implements the io.Writer interface.

type TeeWriter

type TeeWriter struct {
	Writers []io.Writer
}

TeeWriter is a writer that writes to multiple other writers.

func (*TeeWriter) Write

func (t *TeeWriter) Write(p []byte) (n int, err error)

Write to each of the underlying streams.

Directories

Path Synopsis
fs
zip
natpmp
Package natpmp implements https://tools.ietf.org/html/rfc6886
Package natpmp implements https://tools.ietf.org/html/rfc6886

Jump to

Keyboard shortcuts

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