ceph-csi/vendor/github.com/mattn/go-isatty
Madhu Rajanna 51a5bde97f ci: update golang dependencies to 1.17.5 release
updating the depencendices to golang 1.17.5
release

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-12-13 07:32:54 +00:00
..
.travis.yml rebase: vendor dependencies for Vault API 2020-11-29 04:03:59 +00:00
doc.go rebase: vendor dependencies for Vault API 2020-11-29 04:03:59 +00:00
go.test.sh rebase: vendor dependencies for Vault API 2020-11-29 04:03:59 +00:00
isatty_bsd.go rebase: vendor dependencies for Vault API 2020-11-29 04:03:59 +00:00
isatty_others.go rebase: vendor dependencies for Vault API 2020-11-29 04:03:59 +00:00
isatty_plan9.go rebase: vendor dependencies for Vault API 2020-11-29 04:03:59 +00:00
isatty_solaris.go rebase: vendor dependencies for Vault API 2020-11-29 04:03:59 +00:00
isatty_tcgets.go rebase: vendor dependencies for Vault API 2020-11-29 04:03:59 +00:00
isatty_windows.go rebase: vendor dependencies for Vault API 2020-11-29 04:03:59 +00:00
LICENSE rebase: vendor dependencies for Vault API 2020-11-29 04:03:59 +00:00
README.md rebase: vendor dependencies for Vault API 2020-11-29 04:03:59 +00:00
renovate.json rebase: vendor dependencies for Vault API 2020-11-29 04:03:59 +00: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