mirror of
https://github.com/go-task/task.git
synced 2024-12-14 10:52:43 +02:00
a407b0a8eb
Ref #104
24 lines
348 B
Go
24 lines
348 B
Go
package output
|
|
|
|
import (
|
|
"io"
|
|
)
|
|
|
|
type Interleaved struct{}
|
|
|
|
func (Interleaved) WrapWriter(w io.Writer, _ string) io.WriteCloser {
|
|
return nopWriterCloser{w: w}
|
|
}
|
|
|
|
type nopWriterCloser struct {
|
|
w io.Writer
|
|
}
|
|
|
|
func (wc nopWriterCloser) Write(p []byte) (int, error) {
|
|
return wc.w.Write(p)
|
|
}
|
|
|
|
func (wc nopWriterCloser) Close() error {
|
|
return nil
|
|
}
|