func/vendor/github.com/mattn/go-isatty
Shashank Sharma 1bbef7a0e6
Removing workaround to disable selinux label - updated (#645)
* pack 0.22, related refactoring

* blank line removed

* custom docker client added in pack client

* gofmt, golint, goimports
2021-11-09 07:47:43 -08:00
..
.travis.yml Vendor dependencies (#531) 2021-09-16 04:42:39 -07:00
LICENSE Vendor dependencies (#531) 2021-09-16 04:42:39 -07:00
README.md Vendor dependencies (#531) 2021-09-16 04:42:39 -07:00
doc.go Vendor dependencies (#531) 2021-09-16 04:42:39 -07:00
go.mod Vendor dependencies (#531) 2021-09-16 04:42:39 -07:00
go.sum Vendor dependencies (#531) 2021-09-16 04:42:39 -07:00
go.test.sh Vendor dependencies (#531) 2021-09-16 04:42:39 -07:00
isatty_bsd.go Vendor dependencies (#531) 2021-09-16 04:42:39 -07:00
isatty_others.go Removing workaround to disable selinux label - updated (#645) 2021-11-09 07:47:43 -08:00
isatty_plan9.go Vendor dependencies (#531) 2021-09-16 04:42:39 -07:00
isatty_solaris.go Removing workaround to disable selinux label - updated (#645) 2021-11-09 07:47:43 -08:00
isatty_tcgets.go Removing workaround to disable selinux label - updated (#645) 2021-11-09 07:47:43 -08:00
isatty_windows.go Vendor dependencies (#531) 2021-09-16 04:42:39 -07: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