Merge pull request #37 from mattn/add-nacl

Add nacl
tree: 514ec7d3b538b73c9ab8da3d0cd4e66009bb779d
  1. .travis.yml
  2. LICENSE
  3. README.md
  4. doc.go
  5. example_test.go
  6. go.mod
  7. go.sum
  8. isatty_android.go
  9. isatty_bsd.go
  10. isatty_others.go
  11. isatty_others_test.go
  12. isatty_solaris.go
  13. isatty_tcgets.go
  14. isatty_windows.go
  15. 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