1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/vendor/github.com/mattn/go-isatty
2019-09-01 21:24:03 +10:00
..
doc.go use dep 2018-08-06 00:38:38 +10:00
isatty_appengine.go use dep 2018-08-06 00:38:38 +10:00
isatty_bsd.go use dep 2018-08-06 00:38:38 +10:00
isatty_linux_ppc64x.go use dep 2018-08-06 00:38:38 +10:00
isatty_linux.go use dep 2018-08-06 00:38:38 +10:00
isatty_others.go use dep 2018-08-06 00:38:38 +10:00
isatty_solaris.go use dep 2018-08-06 00:38:38 +10:00
isatty_windows.go use dep 2018-08-06 00:38:38 +10:00
LICENSE use dep 2018-08-06 00:38:38 +10:00
README.md switch to Go modules 2019-09-01 21:24:03 +10:00

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