commit | 0a45c643ce9720a958037763b2997edc9c4c5e38 | [log] [tgz] |
---|---|---|
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Wed Nov 11 14:39:23 2015 |
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Wed Nov 11 14:39:23 2015 |
tree | 0a11976b53572e1290697c85a6de868bc4ef51fd | |
parent | 7fcbc72f853b92b5720db4a6b8482be612daef24 [diff] | |
parent | d6aaa2f596ae91a0a58d8e7f2c79670991468e4f [diff] |
Merge branch 'master' of git://github.com/mattn/go-isatty
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)