Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCloseOnErrorReader ¶
func NewCloseOnErrorReader(readCloser io.ReadCloser, callBack func() error) io.Reader
NewCloseOnErrorReader creates a new CloseOnErrorReader
Types ¶
type CloseOnErrorReader ¶
type CloseOnErrorReader struct {
// contains filtered or unexported fields
}
CloseOnErrorReader closes reader on any error (includes EOF) and execute a callback function. This is useful when caller wants to read until EOF and cleans up after error when Close() is not guaranteed to be called.
func (*CloseOnErrorReader) Close ¶
func (r *CloseOnErrorReader) Close() error
Close implement io.ReadCloser.Close
type ConcurrentMultiWriter ¶
type ConcurrentMultiWriter struct {
// contains filtered or unexported fields
}
ConcurrentMultiWriter is a concurrent implementation of the io.MultiWriter of the standard library.
func NewConcurrentMultiWriter ¶
func NewConcurrentMultiWriter(writers ...io.Writer) *ConcurrentMultiWriter
NewConcurrentMultiWriter returns a new ConcurrentMultiWriter.
Click to show internal directories.
Click to hide internal directories.