mirror of
https://github.com/mudler/luet.git
synced 2025-09-18 08:12:19 +00:00
* ⬆️ 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>
go-isatty
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
-
k-takata: base idea for IsCygwinTerminal