Documentation ¶
Index ¶
- func CloseOnce(c io.Closer) io.Closer
- func CloserAfterCallback(c io.Closer, cb func()) io.Closer
- func CloserCallback(c io.Closer, cb func()) io.Closer
- func NopReadCloser(r io.Reader) io.ReadCloser
- func NopWriteCloser(w io.Writer) io.WriteCloser
- func ReadCloser(r io.Reader, c io.Closer) io.ReadCloser
- func WriteCloser(w io.Writer, c io.Closer) io.WriteCloser
- type CloserFunc
- type ReaderFromFunc
- type ReaderFunc
- type WriterFunc
- type WriterToFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NopReadCloser ¶
func NopReadCloser(r io.Reader) io.ReadCloser
NopReadCloser wraps an io.Reader to implement io.ReadCloser with empty io.Closer implementation.
func NopWriteCloser ¶
func NopWriteCloser(w io.Writer) io.WriteCloser
NopWriteCloser wraps an io.Writer to implement io.WriteCloser with empty io.Closer implementation.
func ReadCloser ¶
ReadCloser wraps an io.Reader and io.Closer in order to implement io.ReadCloser.
func WriteCloser ¶
WriteCloser wraps an io.Writer and io.Closer in order to implement io.WriteCloser.
Types ¶
type CloserFunc ¶
type CloserFunc func() error
CloserFunc is a function signature which allows a function to implement the io.Closer type.
func (CloserFunc) Close ¶
func (c CloserFunc) Close() error
type ReaderFromFunc ¶
ReaderFromFunc is a function signature which allows a function to implement the io.ReaderFrom type.
type ReaderFunc ¶
ReaderFunc is a function signature which allows a function to implement the io.Reader type.
type WriterFunc ¶
WriterFunc is a function signature which allows a function to implement the io.Writer type.