Documentation ¶
Overview ¶
Package aghio contains extensions for io package's types and methods
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LimitReadCloser ¶
func LimitReadCloser(rc io.ReadCloser, n int64) (limited io.ReadCloser, err error)
LimitReadCloser wraps ReadCloser to make it's Reader stop with ErrLimitReached after n bytes read.
Types ¶
type LimitReachedError ¶
type LimitReachedError struct {
Limit int64
}
LimitReachedError records the limit and the operation that caused it.
func (*LimitReachedError) Error ¶
func (lre *LimitReachedError) Error() string
Error implements error interface for LimitReachedError. TODO(a.garipov): Think about error string format.
Click to show internal directories.
Click to hide internal directories.