commit | 3a115632dcd687f9c8cd01679c83a06a0e21c1f3 | [log] [tgz] |
---|---|---|
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Sat Dec 12 12:33:44 2015 |
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Sat Dec 12 12:33:44 2015 |
tree | 8149d9c50d199595085dc02e6d7718975f425332 | |
parent | 0a45c643ce9720a958037763b2997edc9c4c5e38 [diff] | |
parent | 56b76bdf51f7708750eac80fa38b952bb9f32639 [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)