io

package
v0.63.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 3 Imported by: 109

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountingReader added in v0.62.0

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

CountingReader wraps an io.Reader and counts the number of bytes read. Note: This implementation is NOT thread-safe. It should not be used concurrently from multiple goroutines.

func NewCountingReader added in v0.62.0

func NewCountingReader(r io.Reader) *CountingReader

NewCountingReader creates a new CountingReader that wraps the provided io.Reader.

func (*CountingReader) BytesRead added in v0.62.0

func (c *CountingReader) BytesRead() int64

BytesRead returns the number of bytes read.

func (*CountingReader) Read added in v0.62.0

func (c *CountingReader) Read(p []byte) (int, error)

Read reads data from the underlying reader and counts the number of bytes read.

type ReadSeekCloserAt added in v0.50.0

type ReadSeekCloserAt interface {
	io.ReadSeekCloser
	io.ReaderAt
}

func NopCloser

func NopCloser(r ReadSeekerAt) ReadSeekCloserAt

NopCloser returns a ReadSeekCloserAt with a no-op Close method wrapping the provided Reader r.

type ReadSeekerAt added in v0.50.0

type ReadSeekerAt interface {
	io.ReadSeeker
	io.ReaderAt
}

func NewReadSeekerAt added in v0.45.0

func NewReadSeekerAt(r io.Reader) (ReadSeekerAt, error)

func NewReadSeekerAtWithSize added in v0.50.0

func NewReadSeekerAtWithSize(r io.Reader) (ReadSeekerAt, int64, error)

Jump to

Keyboard shortcuts

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