1
0
mirror of https://github.com/drone/drone-cli.git synced 2024-11-23 09:21:56 +01:00
drone-cli/vendor/github.com/mattn/go-isatty
2015-10-24 17:06:46 -07:00
..
doc.go cli now working with 0.4 woohoo 2015-10-24 17:06:46 -07:00
isatty_bsd.go cli now working with 0.4 woohoo 2015-10-24 17:06:46 -07:00
isatty_linux.go cli now working with 0.4 woohoo 2015-10-24 17:06:46 -07:00
isatty_windows.go cli now working with 0.4 woohoo 2015-10-24 17:06:46 -07:00
LICENSE cli now working with 0.4 woohoo 2015-10-24 17:06:46 -07:00
README.md cli now working with 0.4 woohoo 2015-10-24 17:06:46 -07:00

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)