tree: 316d3873a68d8d664aeac676054dad261b154de6 [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
unum/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)