1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-02 09:21:40 +02:00
lazygit/vendor/github.com/mattn/go-isatty
2020-09-26 11:00:50 +10:00
..
doc.go use dep 2018-08-06 00:38:38 +10:00
go.mod add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
go.sum add in-built logging support for a better dev experience 2020-09-26 11:00:50 +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 add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
isatty_others.go Vendor: Updated dependencies 2019-11-10 23:23:20 +11:00
isatty_plan9.go update dependencies 2019-12-13 11:31:04 +01:00
isatty_solaris.go Vendor: Updated dependencies 2019-11-10 23:23:20 +11:00
isatty_tcgets.go add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
isatty_windows.go Vendor: Updated dependencies 2019-11-10 23:23:20 +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
renovate.json 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