bergquist 6253476c73 tech(build): move dependencies to vendor folder 9 лет назад
..
LICENSE 6253476c73 tech(build): move dependencies to vendor folder 9 лет назад
README.md 6253476c73 tech(build): move dependencies to vendor folder 9 лет назад
doc.go 6253476c73 tech(build): move dependencies to vendor folder 9 лет назад
isatty_appengine.go 6253476c73 tech(build): move dependencies to vendor folder 9 лет назад
isatty_bsd.go 6253476c73 tech(build): move dependencies to vendor folder 9 лет назад
isatty_linux.go 6253476c73 tech(build): move dependencies to vendor folder 9 лет назад
isatty_solaris.go 6253476c73 tech(build): move dependencies to vendor folder 9 лет назад
isatty_windows.go 6253476c73 tech(build): move dependencies to vendor folder 9 лет назад

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)