io

package
v0.0.0-...-fab57c2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package io provides a mockable wrapper for io.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) Copy

func (*Impl) Copy(dst io.Writer, src io.Reader) (written int64, err error)

func (*Impl) CopyBuffer

func (*Impl) CopyBuffer(dst io.Writer, src io.Reader, buf []byte) (written int64, err error)

func (*Impl) CopyN

func (*Impl) CopyN(dst io.Writer, src io.Reader, n int64) (written int64, err error)

func (*Impl) LimitReader

func (*Impl) LimitReader(r io.Reader, n int64) io.Reader

func (*Impl) MultiReader

func (*Impl) MultiReader(readers ...io.Reader) io.Reader

func (*Impl) MultiWriter

func (*Impl) MultiWriter(writers ...io.Writer) io.Writer

func (*Impl) NewSectionReader

func (*Impl) NewSectionReader(r io.ReaderAt, off int64, n int64) *io.SectionReader

func (*Impl) NopCloser

func (*Impl) NopCloser(r io.Reader) io.ReadCloser

func (*Impl) Pipe

func (*Impl) Pipe() (*io.PipeReader, *io.PipeWriter)

func (*Impl) ReadAll

func (*Impl) ReadAll(r io.Reader) ([]byte, error)

func (*Impl) ReadAtLeast

func (*Impl) ReadAtLeast(r io.Reader, buf []byte, min int) (n int, err error)

func (*Impl) ReadFull

func (*Impl) ReadFull(r io.Reader, buf []byte) (n int, err error)

func (*Impl) TeeReader

func (*Impl) TeeReader(r io.Reader, w io.Writer) io.Reader

func (*Impl) WriteString

func (*Impl) WriteString(w io.Writer, s string) (n int, err error)

type Interface

type Interface interface {
	Copy(dst io.Writer, src io.Reader) (written int64, err error)
	CopyBuffer(dst io.Writer, src io.Reader, buf []byte) (written int64, err error)
	CopyN(dst io.Writer, src io.Reader, n int64) (written int64, err error)
	LimitReader(r io.Reader, n int64) io.Reader
	MultiReader(readers ...io.Reader) io.Reader
	MultiWriter(writers ...io.Writer) io.Writer
	NewSectionReader(r io.ReaderAt, off int64, n int64) *io.SectionReader
	NopCloser(r io.Reader) io.ReadCloser
	Pipe() (*io.PipeReader, *io.PipeWriter)
	ReadAll(r io.Reader) ([]byte, error)
	ReadAtLeast(r io.Reader, buf []byte, min int) (n int, err error)
	ReadFull(r io.Reader, buf []byte) (n int, err error)
	TeeReader(r io.Reader, w io.Writer) io.Reader
	WriteString(w io.Writer, s string) (n int, err error)
}

Directories

Path Synopsis
Package fs provides a mockable wrapper for io/fs.
Package fs provides a mockable wrapper for io/fs.
Package ioutil provides a mockable wrapper for io/ioutil.
Package ioutil provides a mockable wrapper for io/ioutil.

Jump to

Keyboard shortcuts

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