tee: allow writing strings.
This commit is contained in:
parent
30ffbbdbc5
commit
3bb1362c0e
|
@ -5,9 +5,15 @@ import (
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type WriteStringCloser interface {
|
||||||
|
Write([]byte) (int, error)
|
||||||
|
WriteString(string) (int, error)
|
||||||
|
Close() error
|
||||||
|
}
|
||||||
|
|
||||||
// Tee emulates the Unix tee(1) command.
|
// Tee emulates the Unix tee(1) command.
|
||||||
type Tee struct {
|
type Tee struct {
|
||||||
f *os.File
|
f WriteStringCloser
|
||||||
Verbose bool
|
Verbose bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue