open-vault/vendor/github.com/mattn/go-isatty
Josh Black 6e92c8cbd2
Add a new "vault monitor" command (#8477)
Add a new "vault monitor" command

Co-authored-by: ncabatoff <ncabatoff@hashicorp.com>
Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2020-05-21 13:07:50 -07:00
..
.travis.yml Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
doc.go
go.mod Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
go.sum Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
go.test.sh Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
isatty_bsd.go Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
isatty_others.go
isatty_plan9.go Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
isatty_solaris.go
isatty_tcgets.go Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
isatty_windows.go
LICENSE
README.md Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
renovate.json Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07: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