Aucune description

Yasuhiro Matsumoto 0e9ddb7c0c Remove line go1.14 il y a 5 ans
.github da60ac76bf Create FUNDING.yml il y a 5 ans
.travis.yml f4b977dc73 test on osx/linux il y a 7 ans
LICENSE f60d253179 Added license file. il y a 9 ans
README.md 9622e0cc9d fix badges il y a 7 ans
doc.go d8798807d8 godoc il y a 10 ans
example_test.go b6ee8e8f7b Move example to godoc il y a 7 ans
go.mod 0e9ddb7c0c Remove line go1.14 il y a 5 ans
go.sum 88ba11cfdc Add missing function for plan9 il y a 5 ans
isatty_android.go 43386f24a3 Add missing method il y a 5 ans
isatty_bsd.go 0cbfc10b1b remove isatty_others il y a 6 ans
isatty_others.go e7a4104fd8 Add nacl il y a 5 ans
isatty_others_test.go 50daa11e01 add test il y a 7 ans
isatty_plan9.go 88ba11cfdc Add missing function for plan9 il y a 5 ans
isatty_solaris.go 0cbfc10b1b remove isatty_others il y a 6 ans
isatty_tcgets.go 463fe4a8d0 Add AIX support il y a 5 ans
isatty_windows.go bf9a1dea19 add support for windows xp using NtQueryObject in ntdll.dll (#40) il y a 5 ans
isatty_windows_test.go bf9a1dea19 add support for windows xp using NtQueryObject in ntdll.dll (#40) il y a 5 ans

README.md

go-isatty

Godoc Reference Build Status Coverage Status Go Report Card

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