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-12-13 11:31:04 +01:00
..
doc.go use dep 2018-08-06 00:38:38 +10:00
go.mod update dependencies 2019-12-13 11:31:04 +01:00
go.sum update dependencies 2019-12-13 11:31:04 +01:00
isatty_android.go Vendor: Updated dependencies 2019-11-10 23:23:20 +11:00
isatty_bsd.go Vendor: Updated dependencies 2019-11-10 23:23:20 +11: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 Vendor: Updated dependencies 2019-11-10 23:23:20 +11: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 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