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 Migrate to built-in Go vendoring. 2016-02-18 15:06:02 -05:00
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 update dependencies (#7390) 2019-09-03 16:08:50 -04:00
isatty_plan9.go Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
isatty_solaris.go update dependencies (#7390) 2019-09-03 16:08:50 -04:00
isatty_tcgets.go Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
isatty_windows.go Update master's sdk/api 2019-12-18 16:36:50 -05:00
LICENSE Migrate to built-in Go vendoring. 2016-02-18 15:06:02 -05:00
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