packer-cn/vendor/github.com/mattn/go-isatty
Chris Bednarski 8a53385cbc Revert "Remove a bunch of unused dependencies (godep v54+ required)"
This reverts commit 9ed133ea01.
2016-02-22 11:44:12 -08:00
..
LICENSE Revert "Remove a bunch of unused dependencies (godep v54+ required)" 2016-02-22 11:44:12 -08:00
README.md Revert "Remove a bunch of unused dependencies (godep v54+ required)" 2016-02-22 11:44:12 -08:00
doc.go Revert "Remove a bunch of unused dependencies (godep v54+ required)" 2016-02-22 11:44:12 -08:00
isatty_appengine.go Revert "Remove a bunch of unused dependencies (godep v54+ required)" 2016-02-22 11:44:12 -08:00
isatty_bsd.go Revert "Remove a bunch of unused dependencies (godep v54+ required)" 2016-02-22 11:44:12 -08:00
isatty_linux.go Revert "Remove a bunch of unused dependencies (godep v54+ required)" 2016-02-22 11:44:12 -08:00
isatty_solaris.go Revert "Remove a bunch of unused dependencies (godep v54+ required)" 2016-02-22 11:44:12 -08:00
isatty_windows.go Revert "Remove a bunch of unused dependencies (godep v54+ required)" 2016-02-22 11:44:12 -08:00

README.md

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)