1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
Files
cowyo/vendor/github.com/mattn/go-isatty
2017-01-31 08:05:27 -05:00
..
2017-01-31 08:05:27 -05:00
2017-01-31 08:05:27 -05:00
2017-01-31 08:05:27 -05:00
2017-01-31 08:05:27 -05:00
2017-01-31 08:05:27 -05: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)