Versions in this module Expand all Collapse all go1 go1.18.10 Jan 10, 2023 Changes in this version + const SeekCurrent + const SeekEnd + const SeekStart + var EOF = errors.New("EOF") + var ErrClosedPipe = errors.New("io: read/write on closed pipe") + var ErrNoProgress = errors.New("multiple Read calls return no data or error") + var ErrShortBuffer = errors.New("short buffer") + var ErrShortWrite = errors.New("short write") + var ErrUnexpectedEOF = errors.New("unexpected EOF") + func Copy(dst Writer, src Reader) (written int64, err error) + func CopyBuffer(dst Writer, src Reader, buf []byte) (written int64, err error) + func CopyN(dst Writer, src Reader, n int64) (written int64, err error) + func Pipe() (*PipeReader, *PipeWriter) + func ReadAll(r Reader) ([]byte, error) + func ReadAtLeast(r Reader, buf []byte, min int) (n int, err error) + func ReadFull(r Reader, buf []byte) (n int, err error) + func WriteString(w Writer, s string) (n int, err error) + type ByteReader interface + ReadByte func() (byte, error) + type ByteScanner interface + UnreadByte func() error + type ByteWriter interface + WriteByte func(c byte) error + type Closer interface + Close func() error + type LimitedReader struct + N int64 + R Reader + func (l *LimitedReader) Read(p []byte) (n int, err error) + type PipeReader struct + func (r *PipeReader) Close() error + func (r *PipeReader) CloseWithError(err error) error + func (r *PipeReader) Read(data []byte) (n int, err error) + type PipeWriter struct + func (w *PipeWriter) Close() error + func (w *PipeWriter) CloseWithError(err error) error + func (w *PipeWriter) Write(data []byte) (n int, err error) + type ReadCloser interface + func NopCloser(r Reader) ReadCloser + type ReadSeekCloser interface + type ReadSeeker interface + type ReadWriteCloser interface + type ReadWriteSeeker interface + type ReadWriter interface + type Reader interface + Read func(p []byte) (n int, err error) + func LimitReader(r Reader, n int64) Reader + func MultiReader(readers ...Reader) Reader + func TeeReader(r Reader, w Writer) Reader + type ReaderAt interface + ReadAt func(p []byte, off int64) (n int, err error) + type ReaderFrom interface + ReadFrom func(r Reader) (n int64, err error) + type RuneReader interface + ReadRune func() (r rune, size int, err error) + type RuneScanner interface + UnreadRune func() error + type SectionReader struct + func NewSectionReader(r ReaderAt, off int64, n int64) *SectionReader + func (s *SectionReader) Read(p []byte) (n int, err error) + func (s *SectionReader) ReadAt(p []byte, off int64) (n int, err error) + func (s *SectionReader) Seek(offset int64, whence int) (int64, error) + func (s *SectionReader) Size() int64 + type Seeker interface + Seek func(offset int64, whence int) (int64, error) + type StringWriter interface + WriteString func(s string) (n int, err error) + type WriteCloser interface + type WriteSeeker interface + type Writer interface + Write func(p []byte) (n int, err error) + var Discard Writer = discard{} + func MultiWriter(writers ...Writer) Writer + type WriterAt interface + WriteAt func(p []byte, off int64) (n int, err error) + type WriterTo interface + WriteTo func(w Writer) (n int64, err error)