Documentation ¶
Overview ¶
Package iomisc implements miscellaneous I/O facilities
Index ¶
- func Combine(r1, r2 io.Reader) io.Reader
- func Dup(u io.Reader) (r1, r2 io.Reader)
- func ForwardClose(_ string, sink io.WriteCloser, source io.Reader, eof func())
- func MultiWriter(writers ...io.Writer) io.Writer
- func PrefixReader(p string, r io.Reader) io.Reader
- func PrefixWriter(prefix string, w io.Writer) io.Writer
- func ReadCloserEOF(r io.ReadCloser) io.ReadCloser
- func ReaderEOF(r io.Reader) io.Reader
- func ReaderEOFNopCloser(r io.Reader) io.ReadCloser
- func ReaderNopCloser(r io.Reader) io.ReadCloser
- func SniffClose(name string, sink io.WriteCloser, source io.Reader, eof func())
- type Sniffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dup ¶
Dup splits the reader src into two identical readers r1 and r2 that can be used out of sync.
func ForwardClose ¶
func ForwardClose(_ string, sink io.WriteCloser, source io.Reader, eof func())
??
func MultiWriter ¶
MultiWriter creates a writer that duplicates its writes to all the provided writers. Unlike io.MultiWriter, this one will process writes even if the writers are broken, making sure that writes to this writer never block.
func PrefixReader ¶
PrefixReader returns a reader that reads from r, but only in chunks of entire lines and returns the lines on the other side prefixed by prefix.
func ReadCloserEOF ¶
func ReadCloserEOF(r io.ReadCloser) io.ReadCloser
ReadCloserEOF returns an io.ReadCloser which will return an io.EOF error as soon as the reader r is empty.
func ReaderEOF ¶
ReaderEOF returns an io.Reader which will return an io.EOF error as soon as the reader r is empty.
func SniffClose ¶
func SniffClose(name string, sink io.WriteCloser, source io.Reader, eof func())
??