iout

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MkdirMode os.FileMode = 0770

Functions

func CopyFile

func CopyFile(src, dst string, m os.FileMode) error

func MkdirAllCopyFile

func MkdirAllCopyFile(src, dst string, m os.FileMode) error

func MkdirAllCopyFileSync

func MkdirAllCopyFileSync(src, dst string, m os.FileMode) error

func MkdirAllWriteFile

func MkdirAllWriteFile(filename string, src []byte, m os.FileMode) error

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
}

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

func NewAutoBufWriter

func NewAutoBufWriter(w io.Writer, size int) *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 FnCloser

type FnCloser func() error

func (FnCloser) Close

func (c FnCloser) Close() error

type FnReader

type FnReader func([]byte) (int, error)

func (FnReader) Read

func (r FnReader) Read(p []byte) (int, error)

type FnWriter

type FnWriter func([]byte) (int, error)

func (FnWriter) Write

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

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