Nessuna descrizione

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

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