No Description

Yasuhiro Matsumoto 0360b2af4f revert change of isatty_others.go 8 years ago
.travis.yml 018779d6e8 remove sudo 8 years ago
LICENSE f60d253179 Added license file. 10 years ago
README.md 9622e0cc9d fix badges 8 years ago
doc.go d8798807d8 godoc 11 years ago
example_test.go b6ee8e8f7b Move example to godoc 8 years ago
isatty_appengine.go 2c84d1a242 Add isCygwinTerminal to non-appengine environments 8 years ago
isatty_bsd.go 089e34f010 Add dragonfly to bsd build 9 years ago
isatty_linux.go 34aedb9539 use golang.org/x/sys on ppc64, ppc64le 8 years ago
isatty_linux_ppc64x.go 78c7b22ebf both fixes ppc64,ppc64le 8 years ago
isatty_others.go 0360b2af4f revert change of isatty_others.go 8 years ago
isatty_others_test.go 50daa11e01 add test 8 years ago
isatty_solaris.go ca19903305 Support for AppEngine classic 10 years ago
isatty_windows.go 928cf5943f fixes for review 9 years ago
isatty_windows_test.go 05d3780075 add build costraint 9 years ago

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