delve/vendor/github.com/mattn/go-isatty
aarzilli a357ce0638 tests: fix typecheckrpc.go and convert it to a test
We forgot to run typecheckrpc.go periodically and it didn't work
anymore and there were some minor errors in service/rpc2/client.go.

Rewrite typecheckrpc.go using go/packages, so that it works with go1.11
and go.mod, and fix the issues in client.go
2019-01-07 11:47:49 -08:00
..
.travis.yml tests: fix typecheckrpc.go and convert it to a test 2019-01-07 11:47:49 -08:00
doc.go terminal: Use go-colorable 2016-04-18 12:49:14 -07:00
isatty_appengine.go vendor: update vendored packages (#791) 2017-04-17 14:13:00 -07:00
isatty_bsd.go vendor: update vendored packages (#791) 2017-04-17 14:13:00 -07:00
isatty_linux_ppc64x.go *: Update vendor 2018-06-22 09:45:10 +02:00
isatty_linux.go *: Update vendor 2018-06-22 09:45:10 +02:00
isatty_others.go vendor: update vendored packages (#791) 2017-04-17 14:13:00 -07:00
isatty_solaris.go terminal: Use go-colorable 2016-04-18 12:49:14 -07:00
isatty_windows.go vendor: update vendored packages (#791) 2017-04-17 14:13:00 -07:00
LICENSE terminal: Use go-colorable 2016-04-18 12:49:14 -07:00
README.md tests: fix typecheckrpc.go and convert it to a test 2019-01-07 11:47:49 -08: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