tee: allow writing strings.

This commit is contained in:
Kyle Isom 2022-02-20 17:42:59 -08:00
parent 30ffbbdbc5
commit 3bb1362c0e
1 changed files with 7 additions and 1 deletions

View File

@ -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
} }