status-go/vendor/github.com/mattn/go-isatty
Siddarth Kumar 926f6a3c72 Revert "test: bump go-libp2p"
This reverts commit d0ca4447c6.
2024-01-18 20:29:33 +00: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.test.sh chore: bump go-waku (#2404) 2021-10-19 09:43:41 -04:00
isatty_bsd.go Revert "test: bump go-libp2p" 2024-01-18 20:29:33 +00:00
isatty_others.go Revert "test: bump go-libp2p" 2024-01-18 20:29:33 +00:00
isatty_plan9.go chore: bump go-waku 2022-04-06 10:36:06 -04:00
isatty_solaris.go chore: bump go-waku 2022-04-06 10:36:06 -04:00
isatty_tcgets.go Revert "test: bump go-libp2p" 2024-01-18 20:29:33 +00:00
isatty_windows.go chore: bump go-waku 2022-04-06 10:36:06 -04: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