Documentation ¶
Overview ¶
Package lreader provides a reader that limits the amount of data read from an underlying io.ReadCloser to a specified limit. Once the limit is reached, the underlying ReadCloser is closed and further Read calls to the lreader will return io.EOF.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(r io.ReadCloser, limit int) io.Reader
New initializes a new instance of lreader with the provided ReadCloser and limit, and returns it as an io.Reader. The returned Reader will read from the underlying ReadCloser until the specified limit is reached. At that point, the underlying ReadCloser is closed and further Read calls will return io.EOF.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.