1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-25 17:45:39 +00:00
go-mtree/vendor/github.com/mattn/go-isatty
Vincent Batts f32ba81c5e
*: rework the test tools, so no dep is ignored
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-03 23:15:40 -04:00
..
doc.go *: rework the test tools, so no dep is ignored 2022-04-03 23:15:40 -04:00
go.test.sh *: rework the test tools, so no dep is ignored 2022-04-03 23:15:40 -04:00
isatty_bsd.go *: rework the test tools, so no dep is ignored 2022-04-03 23:15:40 -04:00
isatty_others.go *: rework the test tools, so no dep is ignored 2022-04-03 23:15:40 -04:00
isatty_plan9.go *: rework the test tools, so no dep is ignored 2022-04-03 23:15:40 -04:00
isatty_solaris.go *: rework the test tools, so no dep is ignored 2022-04-03 23:15:40 -04:00
isatty_tcgets.go *: rework the test tools, so no dep is ignored 2022-04-03 23:15:40 -04:00
isatty_windows.go *: rework the test tools, so no dep is ignored 2022-04-03 23:15:40 -04:00
LICENSE *: rework the test tools, so no dep is ignored 2022-04-03 23:15:40 -04:00
README.md *: rework the test tools, so no dep is ignored 2022-04-03 23:15:40 -04:00

go-isatty

Godoc Reference Codecov 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