Clone this repo:
  1. cb30d62 Delete renovate.json by mattn · 9 months ago master
  2. 28b35a3 Merge pull request #51 from martinlindhe/master by mattn · 9 months ago
  3. dc81b0f add wasm target to others by Martin Lindhe · 9 months ago
  4. 7b513a9 Merge pull request #49 from tklauser/use-x-sys by mattn · 9 months ago v0.0.12
  5. fb38f00 Add gomodTidy to postUpdateOptions in renovate.json (#50) by Tobias Klauser · 9 months ago

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