cheat/vendor/github.com/mattn/go-isatty
Chris Allen Lane 3786ac96a5
3.3.1 (#529)
* makefile wip

* feat: adds Makefile

Adds a `Makefile` for managing build-related tasks.

* chore: updates dependencies

* chore: updates dependencies

* chore: updates bin scripts

- Removes `build_release.sh`
- Places deprecation notice in `build_devel.sh`, as its purpose has been
  superceded by the `Makefile`.

* chore: updates bin scripts

- Removes `build_release.sh`
- Places deprecation notice in `build_devel.sh`, as its purpose has been
  superceded by the `Makefile`.

* fix: Makefile

Makes several corrections and improvements to the `Makefile`:

- Previously, the `ifeq` rules were not behaving as intended, due to
  false assumptions regarding how `make` fundamentally behaves.
  Malfunctioning imperative-style programming has been replaced with
  declarative rules to repair this issue.

- Previously, all release executables were zipped after compilation. In
  order to spare non-Windows users from (possibly) needing to install a
  package to unzip the executables, all non-Windows binaries are now
  compressed with `gzip`. (Windows executables are still compressed with
  `zip`.)

- Removes a bit of needlessly verbosity in several rules and paths.

* chore: updates dependencies

* chore: bumps version to 3.3.1
2020-01-25 14:44:51 -05:00
..
.travis.yml 3.3.1 (#529) 2020-01-25 14:44:51 -05:00
LICENSE Add vendor files for go build 2019-10-27 12:04:31 -04:00
README.md 3.3.1 (#529) 2020-01-25 14:44:51 -05:00
doc.go Add vendor files for go build 2019-10-27 12:04:31 -04:00
go.mod 3.3.1 (#529) 2020-01-25 14:44:51 -05:00
go.sum 3.3.1 (#529) 2020-01-25 14:44:51 -05:00
go.test.sh 3.3.1 (#529) 2020-01-25 14:44:51 -05:00
isatty_bsd.go 3.3.1 (#529) 2020-01-25 14:44:51 -05:00
isatty_others.go fix: removed colorization on non-tty 2019-10-29 19:47:56 -04:00
isatty_plan9.go chore: updates dependencies 2019-12-28 09:07:37 -05:00
isatty_solaris.go fix: removed colorization on non-tty 2019-10-29 19:47:56 -04:00
isatty_tcgets.go 3.3.1 (#529) 2020-01-25 14:44:51 -05:00
isatty_windows.go fix: removed colorization on non-tty 2019-10-29 19:47:56 -04:00
renovate.json 3.3.1 (#529) 2020-01-25 14:44:51 -05: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