countingreader

package
v2.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package countingreader implements an io.Reader that counts the number of bytes read.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	ReadBytes uint64
	// contains filtered or unexported fields
}

Reader wraps an io.Reader, counting the total number of bytes read. It will wrap around after reading 16 exbibytes, which is assumed to be sufficient.

func New

func New(r io.Reader) *Reader

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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