Gitote bc701732b4 Initial Commit 6 年 前
..
LICENSE bc701732b4 Initial Commit 6 年 前
README.md bc701732b4 Initial Commit 6 年 前
doc.go bc701732b4 Initial Commit 6 年 前
isatty_appengine.go bc701732b4 Initial Commit 6 年 前
isatty_bsd.go bc701732b4 Initial Commit 6 年 前
isatty_linux.go bc701732b4 Initial Commit 6 年 前
isatty_solaris.go bc701732b4 Initial Commit 6 年 前
isatty_windows.go bc701732b4 Initial Commit 6 年 前

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)