blob: 52d6653b34bb79d866522ea8c217e8b6f383a0fd [file] [log] [blame]
David K. Bainbridge215e0242017-09-05 23:18:24 -07001// +build !windows
2
3package colorable
4
5import (
6 "io"
7 "os"
8)
9
10func NewColorable(file *os.File) io.Writer {
11 if file == nil {
12 panic("nil passed instead of *os.File to NewColorable()")
13 }
14
15 return file
16}
17
18func NewColorableStdout() io.Writer {
19 return os.Stdout
20}
21
22func NewColorableStderr() io.Writer {
23 return os.Stderr
24}