plugeth/Godeps/_workspace/src/github.com/mattn/go-isatty
2016-02-11 16:16:52 +02:00
..
doc.go cmd/geth: fix #853 colorize console output in windows 2015-05-05 14:44:39 +03:00
isatty_appengine.go Godeps: update all dependencies to latest code 2016-02-11 16:16:52 +02:00
isatty_bsd.go Godeps: update all dependencies to latest code 2016-02-11 16:16:52 +02:00
isatty_linux.go Godeps: update all dependencies to latest code 2016-02-11 16:16:52 +02:00
isatty_solaris.go Godeps: update all dependencies to latest code 2016-02-11 16:16:52 +02:00
isatty_windows.go Godeps: update all dependencies to latest code 2016-02-11 16:16:52 +02:00
LICENSE Pull in ethash and go-isatty updates 2015-08-31 12:14:32 -04:00
README.md cmd/geth: fix #853 colorize console output in windows 2015-05-05 14:44:39 +03:00

go-isatty

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 {
		fmt.Println("Is Not Terminal")
	}
}

Installation

$ go get github.com/mattn/go-isatty

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)