automation-tests/vendor/github.com/mattn/go-isatty
Daniel J Walsh 310eae4ba4
Switch all builds to pull-never
Fixes: https://github.com/containers/buildah/issues/2779

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-16 06:19:58 -04:00
..
.travis.yml Switch all builds to pull-never 2021-03-16 06:19:58 -04:00
LICENSE short-name aliasing 2020-11-13 15:40:06 +01:00
README.md Switch all builds to pull-never 2021-03-16 06:19:58 -04:00
doc.go short-name aliasing 2020-11-13 15:40:06 +01:00
go.mod Switch all builds to pull-never 2021-03-16 06:19:58 -04:00
go.sum Switch all builds to pull-never 2021-03-16 06:19:58 -04:00
go.test.sh Switch all builds to pull-never 2021-03-16 06:19:58 -04:00
isatty_bsd.go Switch all builds to pull-never 2021-03-16 06:19:58 -04:00
isatty_others.go Switch all builds to pull-never 2021-03-16 06:19:58 -04:00
isatty_plan9.go Switch all builds to pull-never 2021-03-16 06:19:58 -04:00
isatty_solaris.go Switch all builds to pull-never 2021-03-16 06:19:58 -04:00
isatty_tcgets.go Switch all builds to pull-never 2021-03-16 06:19:58 -04:00
isatty_windows.go Switch all builds to pull-never 2021-03-16 06:19:58 -04:00
renovate.json Switch all builds to pull-never 2021-03-16 06:19:58 -04:00

README.md

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