ioutils

package
v0.0.0-...-71fc4e6 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2015 License: MIT Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFull

func ReadFull(r io.Reader, p []byte) (int, error)

func SimpleReadCloser

func SimpleReadCloser(r io.ReadCloser) io.ReadCloser

func SimpleReader

func SimpleReader(r io.Reader) io.Reader

func SimpleWriteCloser

func SimpleWriteCloser(w io.WriteCloser) io.WriteCloser

func SimpleWriter

func SimpleWriter(w io.Writer) io.Writer

func WriteFileAtomic

func WriteFileAtomic(filename string, data []byte, perm os.FileMode) error

Write file to temp and atomically move when everything else succeeds.

func WriteFull

func WriteFull(w io.Writer, p []byte) (int, error)

Types

type CountReader

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

func NewCountReader

func NewCountReader(r io.Reader, p *atomic2.Int64) *CountReader

func (*CountReader) Count

func (r *CountReader) Count() int64

func (*CountReader) Read

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

func (*CountReader) ResetCounter

func (r *CountReader) ResetCounter() int64

type CountWriter

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

func NewCountWriter

func NewCountWriter(w io.Writer, p *atomic2.Int64) *CountWriter

func (*CountWriter) Count

func (w *CountWriter) Count() int64

func (*CountWriter) ResetCounter

func (w *CountWriter) ResetCounter() int64

func (*CountWriter) Write

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

Jump to

Keyboard shortcuts

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