mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-15 23:59:57 +00:00
961c878e0d
Switch to using Go modules. This migrates our vendor.json to use Go 1.11's modules system, and replaces the vendor folder with the output of go mod vendor. The vendored code should remain basically the same; I believe some tree shaking of packages and support scripts/licenses/READMEs/etc. happened. This also fixes Travis and our Makefile to no longer use govendor.
31 lines
639 B
Go
31 lines
639 B
Go
// +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
|
|
}
|