tree: d354d5870b85a20c23e0c2d803dbe7ae223d8cf7 [path history] [tgz]
  1. LICENSE
  2. README.md
  3. doc.go
  4. isatty_appengine.go
  5. isatty_bsd.go
  6. isatty_linux.go
  7. isatty_solaris.go
  8. isatty_windows.go
automation/vendor/github.com/mattn/go-isatty/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)