packer-cn/vendor/github.com/mattn/go-isatty
Adrien Delorme 4ebcbad332
update consul and vault dependencies (#9205)
* update consul and vault dependencies

* update triton sign call accorting to https://github.com/joyent/triton-go/pull/135

* Delete readme.md

* put back github.com/mitchellh/reflectwalk to v1.0.0 and explain why

* fix/fixer_pp_docker_tag_tags.go: simplify deduplication loop and keep seen/stable order
2020-05-11 15:26:01 -04:00
..
.travis.yml update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
LICENSE Revert "Remove a bunch of unused dependencies (godep v54+ required)" 2016-02-22 11:44:12 -08:00
README.md update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
doc.go Revert "Remove a bunch of unused dependencies (godep v54+ required)" 2016-02-22 11:44:12 -08:00
go.mod update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
go.sum update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
go.test.sh update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
isatty_bsd.go update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
isatty_others.go update to newest version of go-tty to fix control flow bug 2019-11-12 10:17:21 -08:00
isatty_plan9.go update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
isatty_solaris.go update to newest version of go-tty to fix control flow bug 2019-11-12 10:17:21 -08:00
isatty_tcgets.go update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
isatty_windows.go update to newest version of go-tty to fix control flow bug 2019-11-12 10:17:21 -08:00
renovate.json update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00

README.md

go-isatty

Godoc Reference Codecov Coverage Status Go Report Card

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 if isatty.IsCygwinTerminal(os.Stdout.Fd()) {
		fmt.Println("Is Cygwin/MSYS2 Terminal")
	} else {
		fmt.Println("Is Not Terminal")
	}
}

Installation

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

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)

Thanks