David K. Bainbridge | 215e024 | 2017-09-05 23:18:24 -0700 | [diff] [blame] | 1 | // +build !windows |
2 | |||||
3 | package colorable | ||||
4 | |||||
5 | import ( | ||||
6 | "io" | ||||
7 | "os" | ||||
8 | ) | ||||
9 | |||||
10 | func 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 | |||||
18 | func NewColorableStdout() io.Writer { | ||||
19 | return os.Stdout | ||||
20 | } | ||||
21 | |||||
22 | func NewColorableStderr() io.Writer { | ||||
23 | return os.Stderr | ||||
24 | } |