Sen descrición

Yasuhiro Matsumoto 9b0bf5f2fc update README.md %!s(int64=7) %!d(string=hai) anos
_example 45f5d8f695 Add IsCygwinTerminal to check cygwin/msys2 terminal %!s(int64=7) %!d(string=hai) anos
.travis.yml 14451b27da add .travis.yml %!s(int64=7) %!d(string=hai) anos
LICENSE f60d253179 Added license file. %!s(int64=9) %!d(string=hai) anos
README.md 9b0bf5f2fc update README.md %!s(int64=7) %!d(string=hai) anos
doc.go d8798807d8 godoc %!s(int64=10) %!d(string=hai) anos
isatty_appengine.go ca19903305 Support for AppEngine classic %!s(int64=9) %!d(string=hai) anos
isatty_bsd.go 089e34f010 Add dragonfly to bsd build %!s(int64=8) %!d(string=hai) anos
isatty_linux.go ca19903305 Support for AppEngine classic %!s(int64=9) %!d(string=hai) anos
isatty_non_windows_test.go 6edd7e33e0 add test for non-Windows %!s(int64=7) %!d(string=hai) anos
isatty_not_windows.go 45f5d8f695 Add IsCygwinTerminal to check cygwin/msys2 terminal %!s(int64=7) %!d(string=hai) anos
isatty_solaris.go ca19903305 Support for AppEngine classic %!s(int64=9) %!d(string=hai) anos
isatty_windows.go 928cf5943f fixes for review %!s(int64=7) %!d(string=hai) anos
isatty_windows_test.go 05d3780075 add build costraint %!s(int64=7) %!d(string=hai) anos

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