cheat/vendor/github.com/mattn/go-isatty
dependabot[bot] 8385277b28
chore(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.13 to 0.0.14.
- [Release notes](https://github.com/mattn/go-isatty/releases)
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.13...v0.0.14)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-07 22:10:46 +00: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 chore(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14 2021-09-07 22:10:46 +00: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 chore(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14 2021-09-07 22:10:46 +00:00
isatty_others.go chore(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14 2021-09-07 22:10:46 +00:00
isatty_plan9.go chore(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14 2021-09-07 22:10:46 +00:00
isatty_solaris.go chore(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14 2021-09-07 22:10:46 +00:00
isatty_tcgets.go chore(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14 2021-09-07 22:10:46 +00:00
isatty_windows.go chore(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14 2021-09-07 22:10:46 +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