You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637
  1. # go-isatty
  2. isatty for golang
  3. ## Usage
  4. ```go
  5. package main
  6. import (
  7. "fmt"
  8. "github.com/mattn/go-isatty"
  9. "os"
  10. )
  11. func main() {
  12. if isatty.IsTerminal(os.Stdout.Fd()) {
  13. fmt.Println("Is Terminal")
  14. } else {
  15. fmt.Println("Is Not Terminal")
  16. }
  17. }
  18. ```
  19. ## Installation
  20. ```
  21. $ go get github.com/mattn/go-isatty
  22. ```
  23. # License
  24. MIT
  25. # Author
  26. Yasuhiro Matsumoto (a.k.a mattn)