Delete renovate.json
1 file changed
tree: 0e3729ed06efe22a9540164d260af69f0220f914
  1. .github/
  2. .travis.yml
  3. LICENSE
  4. README.md
  5. doc.go
  6. example_test.go
  7. go.mod
  8. go.sum
  9. go.test.sh
  10. isatty_bsd.go
  11. isatty_others.go
  12. isatty_others_test.go
  13. isatty_plan9.go
  14. isatty_solaris.go
  15. isatty_tcgets.go
  16. isatty_windows.go
  17. isatty_windows_test.go
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