Merge pull request #39 from carlosedp/riscv64

Update x/sys to support Risc-V
tree: 672b63e3fa9ea17d1f039142b8fd02a1f32ba33b
  1. .github/
  2. .travis.yml
  3. LICENSE
  4. README.md
  5. doc.go
  6. example_test.go
  7. go.mod
  8. go.sum
  9. isatty_android.go
  10. isatty_bsd.go
  11. isatty_others.go
  12. isatty_others_test.go
  13. isatty_solaris.go
  14. isatty_tcgets.go
  15. isatty_windows.go
  16. isatty_windows_test.go
README.md

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