示例#1
0
// NewErrOutput creates a new TextOutput attached to stderr.
func NewErrOutput(program string) *TextOutput {
	t := NewTextOutput(os.Stderr, program)
	t.Color = terminal.IsTerminal(syscall.Stderr)
	return t
}
示例#2
0
// NewStdOutput creates a new TextOutput attached to stdout.
func NewStdOutput(program string) *TextOutput {
	t := NewTextOutput(os.Stdout, program)
	t.Color = terminal.IsTerminal(syscall.Stdout)
	return t
}