aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/mattn/go-colorable/colorable_others.go
diff options
context:
space:
mode:
authorNathan Dench <ndenc2@gmail.com>2019-05-24 15:16:44 +1000
committerNathan Dench <ndenc2@gmail.com>2019-05-24 15:16:44 +1000
commit107c1cdb09c575aa2f61d97f48d8587eb6bada4c (patch)
treeca7d008643efc555c388baeaf1d986e0b6b3e28c /vendor/github.com/mattn/go-colorable/colorable_others.go
parent844b5a68d8af4791755b8f0ad293cc99f5959183 (diff)
downloadterraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.gz
terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.zst
terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.zip
Upgrade to 0.12
Diffstat (limited to 'vendor/github.com/mattn/go-colorable/colorable_others.go')
-rw-r--r--vendor/github.com/mattn/go-colorable/colorable_others.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/github.com/mattn/go-colorable/colorable_others.go b/vendor/github.com/mattn/go-colorable/colorable_others.go
new file mode 100644
index 0000000..887f203
--- /dev/null
+++ b/vendor/github.com/mattn/go-colorable/colorable_others.go
@@ -0,0 +1,30 @@
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}