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 Better logging (#6038) (#6095) 2019-04-02 08:48:31 +01:00
doc.go Better logging (#6038) (#6095) 2019-04-02 08:48:31 +01:00
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 Better logging (#6038) (#6095) 2019-04-02 08:48:31 +01:00
isatty_bsd.go Better logging (#6038) (#6095) 2019-04-02 08:48:31 +01:00
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 Better logging (#6038) (#6095) 2019-04-02 08:48:31 +01:00
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 Better logging (#6038) (#6095) 2019-04-02 08:48:31 +01:00
README.md Better logging (#6038) (#6095) 2019-04-02 08:48:31 +01: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