2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-18 15:25:31 +00:00
cointop/vendor/github.com/mattn/go-isatty
Stephen Gregoratto 3ec497b96f
Transfer from dep to go modules.
Also update vendored packages while we're at it.
2018-12-26 19:55:08 +11:00
..
.travis.yml Transfer from dep to go modules. 2018-12-26 19:55:08 +11:00
doc.go dep ensure 2018-04-26 01:07:36 -07:00
isatty_appengine.go dep ensure 2018-04-26 01:07:36 -07:00
isatty_bsd.go dep ensure 2018-04-26 01:07:36 -07:00
isatty_linux_ppc64x.go dep ensure 2018-04-26 01:07:36 -07:00
isatty_linux.go dep ensure 2018-04-26 01:07:36 -07:00
isatty_others.go Transfer from dep to go modules. 2018-12-26 19:55:08 +11:00
isatty_solaris.go dep ensure 2018-04-26 01:07:36 -07:00
isatty_windows.go dep ensure 2018-04-26 01:07:36 -07:00
LICENSE dep ensure 2018-04-26 01:07:36 -07:00
README.md dep ensure 2018-04-26 01:07:36 -07:00

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