prysm-pulse/vendor/github.com/mattn/go-isatty
Raul Jordan da20785685 Merge branch 'master' into gitter-badge-1
Former-commit-id: 23f542f43b4b493e38f5aa4c29788ed93a63b43b [formerly 71b23a6a28eb045fcfeab6329de69f1e5455486b]
Former-commit-id: d12b3a6decc876f010a71f98e11df7387c1aaf2a
2018-01-13 17:31:28 -05:00
..
doc.go Merge branch 'master' into gitter-badge-1 2018-01-13 17:31:28 -05:00
isatty_appengine.go Merge branch 'master' into gitter-badge-1 2018-01-13 17:31:28 -05:00
isatty_bsd.go Merge branch 'master' into gitter-badge-1 2018-01-13 17:31:28 -05:00
isatty_linux.go Merge branch 'master' into gitter-badge-1 2018-01-13 17:31:28 -05:00
isatty_not_windows.go Merge branch 'master' into gitter-badge-1 2018-01-13 17:31:28 -05:00
isatty_solaris.go Merge branch 'master' into gitter-badge-1 2018-01-13 17:31:28 -05:00
isatty_windows.go Merge branch 'master' into gitter-badge-1 2018-01-13 17:31:28 -05:00
LICENSE Merge branch 'master' into gitter-badge-1 2018-01-13 17:31:28 -05:00
README.md Merge branch 'master' into gitter-badge-1 2018-01-13 17:31:28 -05:00

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