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 Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func LimitReader(r io.Reader, n int64) io.Reader type LimitedReader func (r *LimitedReader) Read(p []byte) (n int, err error) 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) Source Files ¶ View all Source files limitreader.go Click to show internal directories. Click to hide internal directories.