Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLimitReached = fmt.Errorf("read limit reached")
ErrLimitReached indicates that ReadAllLimit has reached its limit before completing a full read of the io.Reader.
Functions ¶
func ReadAllLimit ¶
ReadAllLimit reads from r until an error, EOF, or after n bytes and returns the data it read. A successful call returns err == nil, not err == EOF. Because ReadAllLimit is defined to read from src until EOF it does not treat an EOF from Read as an error to be reported. If the limit is reached ReadAllLimit will return ErrLimitReached as an error.
Types ¶
Click to show internal directories.
Click to hide internal directories.