1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00
gitea/vendor/github.com/mattn/go-isatty
Lunny Xiao 4f63f283c4
Rename scripts to build and add revive command as a new build tool command (#10942)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-04-03 22:29:12 +03:00
..
.travis.yml
doc.go
go.mod Rename scripts to build and add revive command as a new build tool command (#10942) 2020-04-03 22:29:12 +03:00
go.sum Rename scripts to build and add revive command as a new build tool command (#10942) 2020-04-03 22:29:12 +03:00
isatty_android.go
isatty_bsd.go
isatty_others.go Rename scripts to build and add revive command as a new build tool command (#10942) 2020-04-03 22:29:12 +03:00
isatty_plan9.go Rename scripts to build and add revive command as a new build tool command (#10942) 2020-04-03 22:29:12 +03:00
isatty_solaris.go
isatty_tcgets.go Rename scripts to build and add revive command as a new build tool command (#10942) 2020-04-03 22:29:12 +03:00
isatty_windows.go Rename scripts to build and add revive command as a new build tool command (#10942) 2020-04-03 22:29:12 +03:00
LICENSE
README.md

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