Files
Zach LeslieandGitHub 7b773771b8 Update prometheus dependency and function signature (#3978)
* Update prometheus dependency and function signature

* Update vendor

* Update serverless vendor

* Downgrade protobuf patch release for round-trip gogocodec issue

* Hold back protobuf

* Skip failing test

* Replace test equality
2024-08-20 13:40:54 +00:00
..
2020-01-23 10:25:05 -05:00
2020-02-27 15:25:38 -05:00
2020-01-23 10:25:05 -05:00
2020-02-27 15:25:38 -05:00

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