Files
luet/vendor/github.com/mattn/go-isatty
Ettore Di Giacinto 5ee1ff6d5a ⬆️ Bump to go 1.19 as requirement for building (#319)
* ⬆️ Bump to go 1.19 as requirement for building

Signed-off-by: mudler <mudler@c3os.io>

* ⬆️ Update vendor

* 🤖 Use go 1.19 in CI

* 🤖 Do not pull cover from makefile

Signed-off-by: mudler <mudler@c3os.io>

* 🤖 Fix permission issues

Signed-off-by: mudler <mudler@c3os.io>

* 🤖 Adapt test to getcap output changes

Signed-off-by: mudler <mudler@c3os.io>

---------

Signed-off-by: mudler <mudler@c3os.io>
2023-02-02 11:59:57 +01:00
..
2021-12-21 21:54:14 +01:00
2021-12-21 21:54:14 +01:00
2021-12-21 21:54:14 +01:00
2021-12-21 21:54:14 +01:00
2021-12-21 21:54:14 +01:00
2021-12-21 21:54:14 +01:00
2021-12-21 21:54:14 +01:00
2021-12-21 21:54:14 +01:00
2021-12-21 21:54:14 +01:00
2021-12-21 21:54:14 +01: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