open-consul/vendor/github.com/mattn/go-isatty
Sean Chittenden 333ff22e9a Manage dependencies via Godep
Embrace the future and use Go 1.6's vendor support via Godep.

Go 1.5 users should `export GO15VENDOREXPERIMENT=1`
2016-02-12 16:50:37 -08:00
..
doc.go Manage dependencies via Godep 2016-02-12 16:50:37 -08:00
isatty_appengine.go Manage dependencies via Godep 2016-02-12 16:50:37 -08:00
isatty_bsd.go Manage dependencies via Godep 2016-02-12 16:50:37 -08:00
isatty_linux.go Manage dependencies via Godep 2016-02-12 16:50:37 -08:00
isatty_solaris.go Manage dependencies via Godep 2016-02-12 16:50:37 -08:00
isatty_windows.go Manage dependencies via Godep 2016-02-12 16:50:37 -08:00
LICENSE Manage dependencies via Godep 2016-02-12 16:50:37 -08:00
README.md Manage dependencies via Godep 2016-02-12 16:50:37 -08: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)