Unknwon 2fd69f13d9 vendor: check in vendors | 7 lat temu | |
---|---|---|
.. | ||
LICENSE | 7 lat temu | |
README.md | 7 lat temu | |
doc.go | 7 lat temu | |
isatty_appengine.go | 7 lat temu | |
isatty_bsd.go | 7 lat temu | |
isatty_linux.go | 7 lat temu | |
isatty_solaris.go | 7 lat temu | |
isatty_windows.go | 7 lat temu |
isatty for golang
package main
import (
"fmt"
"github.com/mattn/go-isatty"
"os"
)
func main() {
if isatty.IsTerminal(os.Stdout.Fd()) {
fmt.Println("Is Terminal")
} else {
fmt.Println("Is Not Terminal")
}
}
$ go get github.com/mattn/go-isatty
MIT
Yasuhiro Matsumoto (a.k.a mattn)