1
0
mirror of https://github.com/rancher/rke.git synced 2025-06-25 15:01:58 +00:00
rke/vendor/github.com/mattn/go-isatty
2020-02-26 14:14:42 -08:00
..
.travis.yml Update vendor 2018-11-29 18:56:35 -08:00
doc.go Update vendor 2018-11-29 18:56:35 -08:00
go.mod vendor change 2019-09-30 10:23:45 -07:00
go.sum vendor change 2019-09-30 10:23:45 -07:00
isatty_android.go Go mod and vendor changes 2020-02-26 14:14:42 -08:00
isatty_bsd.go vendor change 2019-09-30 10:23:45 -07:00
isatty_others.go Go mod and vendor changes 2020-02-26 14:14:42 -08:00
isatty_solaris.go vendor change 2019-09-30 10:23:45 -07:00
isatty_tcgets.go Go mod and vendor changes 2020-02-26 14:14:42 -08:00
isatty_windows.go Update vendor 2018-11-29 18:56:35 -08:00
LICENSE Update vendor 2018-11-29 18:56:35 -08:00
README.md Update vendor 2018-11-29 18:56:35 -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