commit | 0360b2af4f38e8d38c7fce2a9f4e702702d73a39 | [log] [tgz] |
---|---|---|
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Mon Sep 25 05:34:41 2017 |
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Mon Sep 25 05:34:41 2017 |
tree | 57cd65f623f10af2707c614e7be8bde91a167c67 | |
parent | 78c7b22ebfc0dfdef06128500171b30d370e293d [diff] |
revert change of isatty_others.go
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 if isatty.IsCygwinTerminal(os.Stdout.Fd()) {
fmt.Println("Is Cygwin/MSYS2 Terminal")
} else {
fmt.Println("Is Not Terminal")
}
}
$ go get github.com/mattn/go-isatty
MIT
Yasuhiro Matsumoto (a.k.a mattn)
k-takata: base idea for IsCygwinTerminal