terraform/vendor/github.com/mattn/go-isatty
Martin Atkins 1bb79696c6 vendor: update to latest github.com/zclconf/go-cty
This includes a bugfix to the cty/msgpack package to ensure correct
decoding of unknown and null values.

This also includes updates to cty's dependencies.
2018-10-16 19:14:11 -07:00
..
LICENSE
README.md
doc.go
isatty_appengine.go vendor: update to latest github.com/zclconf/go-cty 2018-10-16 19:14:11 -07:00
isatty_bsd.go Update deps in unknown state and rever nomad 2017-01-19 20:10:17 -05:00
isatty_linux.go
isatty_solaris.go
isatty_windows.go

README.md

go-isatty

isatty for golang

Usage

package main

import (
	"fmt"
	"github.com/mattn/go-isatty"
	"os"
)

func main() {
	if isatty.IsTerminal(os.Stdout.Fd()) {
		fmt.Println("Is Terminal")
	} else {
		fmt.Println("Is Not Terminal")
	}
}

Installation

$ go get github.com/mattn/go-isatty

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)