status-go/vendor/github.com/mattn/go-isatty
Richard Ramos bade0a24ff
chore: bump go-waku (#2404)
2021-10-19 09:43:41 -04:00
..
.travis.yml chore: bump go-waku (#2404) 2021-10-19 09:43:41 -04:00
LICENSE Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00
README.md chore: bump go-waku (#2404) 2021-10-19 09:43:41 -04:00
doc.go Introduce the dependency vendoring tool: `dep`. (#551) 2018-01-25 14:08:43 +01:00
go.mod chore: bump go-waku (#2404) 2021-10-19 09:43:41 -04:00
go.sum chore: bump go-waku (#2404) 2021-10-19 09:43:41 -04:00
go.test.sh chore: bump go-waku (#2404) 2021-10-19 09:43:41 -04:00
isatty_bsd.go chore: bump go-waku (#2404) 2021-10-19 09:43:41 -04:00
isatty_others.go chore: bump go-waku (#2404) 2021-10-19 09:43:41 -04:00
isatty_plan9.go chore: bump go-waku (#2404) 2021-10-19 09:43:41 -04:00
isatty_solaris.go chore: bump go-waku (#2404) 2021-10-19 09:43:41 -04:00
isatty_tcgets.go chore: bump go-waku (#2404) 2021-10-19 09:43:41 -04:00
isatty_windows.go vendor 2020-07-30 20:20:56 +02:00

README.md

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