limitreader

package
v0.0.0-...-6fe4f4e Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 1 Imported by: 0

README

Exercise 7.5 (P175)

The LimitReader function in the io package accepts an io.Reader r and a number of bytes n, and returns another Reader that reads from r but reports an end-of-file condition after n bytes. Implement it.

    func LimitReader(r io.Reader, n int64) io.Reader

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LimitReader

func LimitReader(r io.Reader, n int64) io.Reader

Types

type LimitedReader

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

https://golang.org/src/io/io.go

func (*LimitedReader) Read

func (r *LimitedReader) 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