github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/mattn/go-colorable/colorable_others.go (about) 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 }