Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiWriter ¶
type MultiWriter struct {
// contains filtered or unexported fields
}
MultiWriter is a writer that writes to multiple other writers.
func New ¶
func New(writers ...io.Writer) *MultiWriter
New creates a writer that duplicates its writes to all the provided writers, similar to the Unix tee(1) command. Writers can be added and removed dynamically after creation.
Each write is written to each listed writer, one at a time. If a listed writer returns an error, that overall write operation stops and returns the error; it does not continue down the list.
func (*MultiWriter) Add ¶
func (mw *MultiWriter) Add(w ...io.Writer)
Add appends a writer to the list of writers this multiwriter writes to.
func (*MultiWriter) Len ¶
func (mw *MultiWriter) Len() int
func (*MultiWriter) Remove ¶
func (mw *MultiWriter) Remove(w io.Writer)
Remove will remove a previously added writer from the list of writers.
func (*MultiWriter) Unpack ¶
func (mw *MultiWriter) Unpack() []io.Writer
Click to show internal directories.
Click to hide internal directories.