iout

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MultiErrors

func MultiErrors(errs ...error) error

Returns an error (MultiError) or nil if the errors added were all nil.

Types

type AutoBufWriter

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

Auto flushes after x time if the buffer doesn't get filled. Safe to use concurrently.

func NewAutoBufWriter

func NewAutoBufWriter(wc io.WriteCloser) *AutoBufWriter

func (*AutoBufWriter) Close

func (w *AutoBufWriter) Close() error

Implements io.Closer

func (*AutoBufWriter) Write

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

Implements io.Writer

type LimitedWriter

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

func NewLimitedWriter

func NewLimitedWriter(size int) *LimitedWriter

func (*LimitedWriter) Bytes

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

func (*LimitedWriter) Write

func (w *LimitedWriter) Write(p []byte) (n int, err error)

type MultiError

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

func (*MultiError) Add

func (me *MultiError) Add(err error)

Can be used concurrently.

func (*MultiError) Error

func (me *MultiError) Error() string

func (*MultiError) Result

func (me *MultiError) Result() error

Returns itself, or nil if it has no errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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