status-go/vendor/github.com/mattn/go-isatty
Igor Mandrigin fb3d2ff6fe
Introduce the dependency vendoring tool: `dep`. (#551)
* Introduce `dep`, the dependency vendoring tool.

Use commits from `go-ethereum@release/1.7` for most of the dependencies.

* Update dependencies.
2018-01-25 14:08:43 +01:00
..
.travis.yml Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00
LICENSE Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00
README.md Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00
doc.go Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00
isatty_appengine.go Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00
isatty_bsd.go Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00
isatty_linux.go Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00
isatty_not_windows.go Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00
isatty_solaris.go Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00
isatty_windows.go Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00

README.md

go-isatty

Build Status Coverage Status

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