Felix Lange 2c4455b12a vendor: update dependencies with github.com/kardianos/govendor il y a 8 ans
..
LICENSE 289b30715d Godeps, vendor: convert dependency management to trash (#3198) il y a 8 ans
README.md 2c4455b12a vendor: update dependencies with github.com/kardianos/govendor il y a 8 ans
doc.go 289b30715d Godeps, vendor: convert dependency management to trash (#3198) il y a 8 ans
isatty_appengine.go 289b30715d Godeps, vendor: convert dependency management to trash (#3198) il y a 8 ans
isatty_bsd.go 289b30715d Godeps, vendor: convert dependency management to trash (#3198) il y a 8 ans
isatty_linux.go 289b30715d Godeps, vendor: convert dependency management to trash (#3198) il y a 8 ans
isatty_not_windows.go 2c4455b12a vendor: update dependencies with github.com/kardianos/govendor il y a 8 ans
isatty_solaris.go 289b30715d Godeps, vendor: convert dependency management to trash (#3198) il y a 8 ans
isatty_windows.go 2c4455b12a vendor: update dependencies with github.com/kardianos/govendor il y a 8 ans

README.md

go-isatty

Build Status Coverage Status

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 if isatty.IsCygwinTerminal(os.Stdout.Fd()) {
		fmt.Println("Is Cygwin/MSYS2 Terminal")
	} else {
		fmt.Println("Is Not Terminal")
	}
}

Installation

$ go get github.com/mattn/go-isatty

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)

Thanks