Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FatalReadCloser ¶
func FatalReadCloser(err error) io.ReadCloser
FatalReadCloser returns a ReadCloser that always fails with err.
func LazyReadCloser ¶
func LazyReadCloser(reader func() (io.ReadCloser, error)) io.ReadCloser
LazyReadCloser returns an ReadCloser that doesn't initialize the backing Reader until the first Read.
func LimitReadCloser ¶
func LimitReadCloser(r io.ReadCloser, n int64) io.ReadCloser
LimitReadCloser is a LimitReader extension that returns a ReadCloser that reads from r but stops with EOF after n bytes.
func MultiReadCloser ¶
func MultiReadCloser(readers ...io.ReadCloser) io.ReadCloser
MultiReadCloser is a MultiReader extension that returns a ReaderCloser that's the logical concatenation of the provided input readers. They're read sequentially. Once all inputs have returned EOF, Read will return EOF. If any of the readers return a non-nil, non-EOF error, Read will return that error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.