tee: allow writing strings.

This commit is contained in:
2022-02-20 17:42:59 -08:00
parent 30ffbbdbc5
commit 3bb1362c0e

View File

@@ -5,9 +5,15 @@ import (
"os"
)
type WriteStringCloser interface {
Write([]byte) (int, error)
WriteString(string) (int, error)
Close() error
}
// Tee emulates the Unix tee(1) command.
type Tee struct {
f *os.File
f WriteStringCloser
Verbose bool
}