Nav apraksta

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

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