src: Add DMA localagent
[barometer.git] / src / dma / vendor / github.com / mattn / go-colorable / colorable_others.go
diff --git a/src/dma/vendor/github.com/mattn/go-colorable/colorable_others.go b/src/dma/vendor/github.com/mattn/go-colorable/colorable_others.go
new file mode 100644 (file)
index 0000000..887f203
--- /dev/null
@@ -0,0 +1,30 @@
+// +build !windows
+// +build !appengine
+
+package colorable
+
+import (
+       "io"
+       "os"
+
+       _ "github.com/mattn/go-isatty"
+)
+
+// NewColorable return new instance of Writer which handle escape sequence.
+func NewColorable(file *os.File) io.Writer {
+       if file == nil {
+               panic("nil passed instead of *os.File to NewColorable()")
+       }
+
+       return file
+}
+
+// NewColorableStdout return new instance of Writer which handle escape sequence for stdout.
+func NewColorableStdout() io.Writer {
+       return os.Stdout
+}
+
+// NewColorableStderr return new instance of Writer which handle escape sequence for stderr.
+func NewColorableStderr() io.Writer {
+       return os.Stderr
+}