io

package
v1.7.15 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package io provides io functions

Package io provides io functions

Index

Constants

This section is empty.

Variables

View Source
var (
	Pipe             = io.Pipe
	EOF              = io.EOF
	NopCloser        = io.NopCloser
	Discard          = io.Discard
	ErrUnexpectedEOF = io.ErrUnexpectedEOF
	ErrClosedPipe    = io.ErrClosedPipe
	ErrNoProgress    = io.ErrNoProgress
	ErrShortWrite    = io.ErrShortWrite
	ErrShortBuffer   = io.ErrShortBuffer
)

Functions

func Copy added in v1.1.1

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

func CopyBuffer added in v1.7.7

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

func NewReadCloserWithContext

func NewReadCloserWithContext(ctx context.Context, r io.ReadCloser) (io.ReadCloser, error)

func NewReaderWithContext

func NewReaderWithContext(ctx context.Context, r io.Reader) (io.Reader, error)

func NewWriteCloserWithContext

func NewWriteCloserWithContext(ctx context.Context, w io.WriteCloser) (io.WriteCloser, error)

func NewWriterWithContext

func NewWriterWithContext(ctx context.Context, w io.Writer) (io.Writer, error)

func ReadAll added in v1.5.1

func ReadAll(r Reader) (b []byte, err error)

Types

type Closer added in v1.1.1

type Closer = io.Closer

type Copier added in v1.1.1

type Copier 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)
}

func NewCopier added in v1.1.1

func NewCopier(size int) Copier

type ReadCloser added in v1.1.1

type ReadCloser = io.ReadCloser

type Reader added in v1.1.1

type Reader = io.Reader

func NewEOFReader added in v1.5.0

func NewEOFReader() Reader

type WriteCloser added in v1.1.1

type WriteCloser = io.WriteCloser

type Writer added in v1.1.1

type Writer = io.Writer

Jump to

Keyboard shortcuts

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