limit

package
v0.21.7 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package limit provides bounded reads from io.Readers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadAll

func ReadAll(r io.Reader, max int64) ([]byte, error)

ReadAll reads from r until EOF and returns the data. If r produces more than max bytes, it returns an error instead of a silently truncated slice. Use this in preference to io.ReadAll(io.LimitReader(r, max)) when callers must distinguish a complete read from a truncated one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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