open-nomad/vendor/github.com/mattn/go-isatty
Seth Hoenig 435c0d9fc8 deps: Switch to Go modules for dependency management
This PR switches the Nomad repository from using govendor to Go modules
for managing dependencies. Aspects of the Nomad workflow remain pretty
much the same. The usual Makefile targets should continue to work as
they always did. The API submodule simply defers to the parent Nomad
version on the repository, keeping the semantics of API versioning that
currently exists.
2020-06-02 14:30:36 -05:00
..
.travis.yml deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
doc.go Revendor isatty since it is used by mitchellh/cli 2017-08-23 15:46:56 -07:00
go.mod deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
go.sum deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
go.test.sh deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
isatty_bsd.go deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
isatty_others.go deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
isatty_plan9.go deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
isatty_solaris.go deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
isatty_tcgets.go deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
isatty_windows.go deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
LICENSE Revendor isatty since it is used by mitchellh/cli 2017-08-23 15:46:56 -07:00
README.md deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
renovate.json deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00

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