github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/mattn/go-isatty/README.md (about)

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