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
2022-03-18 21:36:28 +11:00
..
doc.go use dep 2018-08-06 00:38:38 +10:00
go.test.sh add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
isatty_bsd.go some refactoring in anticipation of the graph feature 2021-11-01 10:03:49 +11:00
isatty_others.go some refactoring in anticipation of the graph feature 2021-11-01 10:03:49 +11:00
isatty_plan9.go some refactoring in anticipation of the graph feature 2021-11-01 10:03:49 +11:00
isatty_solaris.go some refactoring in anticipation of the graph feature 2021-11-01 10:03:49 +11:00
isatty_tcgets.go some refactoring in anticipation of the graph feature 2021-11-01 10:03:49 +11:00
isatty_windows.go some refactoring in anticipation of the graph feature 2021-11-01 10:03:49 +11:00
LICENSE use dep 2018-08-06 00:38:38 +10:00
README.md add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00

go-isatty

Godoc Reference Codecov 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