lreader

package
v0.0.0-...-04b4601 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

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.

Jump to

Keyboard shortcuts

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