reader

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterReader

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

CounterReader wraps an io.ReadCloser and counts the bytes read.

func NewCounterReader

func NewCounterReader(rc io.ReadCloser) *CounterReader

NewCounterReader creates a new CounterReader.

func (*CounterReader) Close

func (cr *CounterReader) Close() error

Close closes the wrapped io.ReadCloser.

func (*CounterReader) Count

func (cr *CounterReader) Count() int64

Count returns the total number of bytes read.

func (*CounterReader) Read

func (cr *CounterReader) Read(p []byte) (int, error)

Read reads from the wrapped io.ReadCloser and counts the bytes read.

Jump to

Keyboard shortcuts

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