1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-30 20:15:39 +00:00
go-mtree/vendor/github.com/mattn/go-isatty
Vincent Batts 4fdc2fd3ed
go*: update modules
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2024-06-11 16:52:57 +00: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 go*: update modules 2024-06-11 16:52:57 +00:00
isatty_others.go go*: update modules 2024-06-11 16:52:57 +00: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 go*: update modules 2024-06-11 16:52:57 +00: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