status-go/vendor/github.com/mattn/go-isatty
Andrea Maria Piana 9ddd963591
vendor
2020-07-30 20:20:56 +02:00
..
.travis.yml migrate to go 1.12 and go modules 2019-06-12 13:12:00 +02:00
LICENSE Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00
README.md migrate to go 1.12 and go modules 2019-06-12 13:12:00 +02:00
doc.go Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00
go.mod vendor 2020-07-30 20:20:56 +02:00
go.sum vendor 2020-07-30 20:20:56 +02:00
isatty_android.go Verify ens endpoint, only against mainnet (#1657) 2019-11-04 11:08:22 +01:00
isatty_bsd.go Upgrade geth 1.8.17 plus add metrics during compilation time (#1273) 2018-11-14 08:03:58 +01:00
isatty_others.go vendor 2020-07-30 20:20:56 +02:00
isatty_plan9.go vendor 2020-07-30 20:20:56 +02:00
isatty_solaris.go Upgrade geth 1.8.17 plus add metrics during compilation time (#1273) 2018-11-14 08:03:58 +01:00
isatty_tcgets.go vendor 2020-07-30 20:20:56 +02:00
isatty_windows.go vendor 2020-07-30 20:20:56 +02:00

README.md

go-isatty

Godoc Reference Build Status 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