1// +build appengine 2 3package colorable 4 5import ( 6 "io" 7 "os" 8 9 _ "github.com/mattn/go-isatty" 10) 11 12// NewColorable return new instance of Writer which handle escape sequence. 13func NewColorable(file *os.File) io.Writer { 14 if file == nil { 15 panic("nil passed instead of *os.File to NewColorable()") 16 } 17 18 return file 19} 20 21// NewColorableStdout return new instance of Writer which handle escape sequence for stdout. 22func NewColorableStdout() io.Writer { 23 return os.Stdout 24} 25 26// NewColorableStderr return new instance of Writer which handle escape sequence for stderr. 27func NewColorableStderr() io.Writer { 28 return os.Stderr 29} 30