luet/vendor/github.com/mattn/go-isatty
Itxaka 4adc0dc9b9
Use goreleaser to build and release (#244)
Instead of using gox on one side and an action to release, we can merge
them together with goreleaser which will build for extra targets (arm,
mips if needed in the future) and it also takes care of creating
checksums, a source archive, and a changelog and creating a release with
all the artifacts.

All binaries should respect the old naming convention, so any scripts
out there should still work.

Signed-off-by: Itxaka <igarcia@suse.com>
2021-08-11 08:30:55 +02:00
..
.travis.yml Update vendor/ (progress bar deps) 2020-11-20 18:16:49 +01:00
doc.go update vendor/ 2019-11-01 16:29:08 +01:00
go.mod Update vendor/ (progress bar deps) 2020-11-20 18:16:49 +01:00
go.sum Update vendor/ (progress bar deps) 2020-11-20 18:16:49 +01:00
go.test.sh Update vendor/ (progress bar deps) 2020-11-20 18:16:49 +01:00
isatty_bsd.go Update vendor/ (progress bar deps) 2020-11-20 18:16:49 +01:00
isatty_others.go Use goreleaser to build and release (#244) 2021-08-11 08:30:55 +02:00
isatty_plan9.go Update vendor/ (progress bar deps) 2020-11-20 18:16:49 +01:00
isatty_solaris.go Use goreleaser to build and release (#244) 2021-08-11 08:30:55 +02:00
isatty_tcgets.go Use goreleaser to build and release (#244) 2021-08-11 08:30:55 +02:00
isatty_windows.go update vendor/ 2019-11-01 16:29:08 +01:00
LICENSE update vendor/ 2019-11-01 16:29:08 +01:00
README.md Update vendor/ (progress bar deps) 2020-11-20 18:16:49 +01: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