]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blame - vendor/github.com/mattn/go-colorable/colorable_others.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / mattn / go-colorable / colorable_others.go
CommitLineData
107c1cdb
ND
1// +build !windows
2// +build !appengine
3
4package colorable
5
6import (
7 "io"
8 "os"
9
10 _ "github.com/mattn/go-isatty"
11)
12
13// NewColorable return new instance of Writer which handle escape sequence.
14func NewColorable(file *os.File) io.Writer {
15 if file == nil {
16 panic("nil passed instead of *os.File to NewColorable()")
17 }
18
19 return file
20}
21
22// NewColorableStdout return new instance of Writer which handle escape sequence for stdout.
23func NewColorableStdout() io.Writer {
24 return os.Stdout
25}
26
27// NewColorableStderr return new instance of Writer which handle escape sequence for stderr.
28func NewColorableStderr() io.Writer {
29 return os.Stderr
30}