tea/vendor/github.com/mattn/go-isatty
Norwin d6df0a53b5 Update Dependencies (#390)
Co-authored-by: Norwin Roosen <git@nroo.de>
Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/390
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2021-08-30 23:18:50 +08:00
..
.travis.yml Use glamour and termev to render/colorize content (#181) 2020-09-19 16:00:50 +00:00
LICENSE Use glamour and termev to render/colorize content (#181) 2020-09-19 16:00:50 +00:00
README.md Use glamour and termev to render/colorize content (#181) 2020-09-19 16:00:50 +00:00
doc.go Use glamour and termev to render/colorize content (#181) 2020-09-19 16:00:50 +00:00
go.mod Use glamour and termev to render/colorize content (#181) 2020-09-19 16:00:50 +00:00
go.sum Use glamour and termev to render/colorize content (#181) 2020-09-19 16:00:50 +00:00
go.test.sh Use glamour and termev to render/colorize content (#181) 2020-09-19 16:00:50 +00:00
isatty_bsd.go Use glamour and termev to render/colorize content (#181) 2020-09-19 16:00:50 +00:00
isatty_others.go Update Dependencies (#390) 2021-08-30 23:18:50 +08:00
isatty_plan9.go Use glamour and termev to render/colorize content (#181) 2020-09-19 16:00:50 +00:00
isatty_solaris.go Update Dependencies (#390) 2021-08-30 23:18:50 +08:00
isatty_tcgets.go Update Dependencies (#390) 2021-08-30 23:18:50 +08:00
isatty_windows.go Use glamour and termev to render/colorize content (#181) 2020-09-19 16:00:50 +00:00

README.md

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