package tee
import "git.wntrmute.dev/kyle/goutils/tee"
Index ¶
- func Close() error
- func Open(logFile string) error
- func Printf(format string, args ...interface{}) (int, error)
- func SetVerbose(verbose bool)
- func VPrintf(format string, args ...interface{}) (int, error)
- type Tee
- func NewOut(logFile string) (*Tee, error)
- func (t *Tee) Close() error
- func (t *Tee) Printf(format string, args ...interface{}) (int, error)
- func (t *Tee) VPrintf(format string, args ...interface{}) (int, error)
- func (t *Tee) Write(p []byte) (int, error)
- type WriteStringCloser
Functions ¶
func Close ¶
func Close() error
Close calls close on the global tee instance.
func Open ¶
Open will attempt to open the logFile for the global tee instance.
func Printf ¶
Printf formats according to a format specifier and writes to the global tee.
func SetVerbose ¶
func SetVerbose(verbose bool)
SetVerbose controls the verbosity of the global tee.
func VPrintf ¶
VPrintf calls VPrintf on the global tee instance.
Types ¶
type Tee ¶
type Tee struct { Verbose bool // contains filtered or unexported fields }
Tee emulates the Unix tee(1) command.
func NewOut ¶
NewOut writes to standard output only. The file is created, not appended to.
func (*Tee) Close ¶
Close calls Close on the underlying file.
func (*Tee) Printf ¶
Printf formats according to a format specifier and writes to the tee instance.
func (*Tee) VPrintf ¶
VPrintf is a variant of Printf that only prints if the Tee's Verbose flag is set.
func (*Tee) Write ¶
type WriteStringCloser ¶
type WriteStringCloser interface { Write([]byte) (int, error) WriteString(string) (int, error) Close() error }
Source Files ¶
tee.go
- Version
- v1.7.7 (latest)
- Published
- Jun 15, 2024
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 4 days ago –
Tools for package owners.