Unknwon 2fd69f13d9 vendor: check in vendors 7 سال پیش
..
LICENSE 2fd69f13d9 vendor: check in vendors 7 سال پیش
README.md 2fd69f13d9 vendor: check in vendors 7 سال پیش
doc.go 2fd69f13d9 vendor: check in vendors 7 سال پیش
isatty_appengine.go 2fd69f13d9 vendor: check in vendors 7 سال پیش
isatty_bsd.go 2fd69f13d9 vendor: check in vendors 7 سال پیش
isatty_linux.go 2fd69f13d9 vendor: check in vendors 7 سال پیش
isatty_solaris.go 2fd69f13d9 vendor: check in vendors 7 سال پیش
isatty_windows.go 2fd69f13d9 vendor: check in vendors 7 سال پیش

README.md

go-isatty

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 {
		fmt.Println("Is Not Terminal")
	}
}

Installation

$ go get github.com/mattn/go-isatty

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)