debian-forge-composer/vendor/github.com/mattn/go-isatty
Ondřej Budai 0359647a82 go.mod: update to Go 1.18
Fedora 35 support was dropped, so we can update to a newer Go.

Stable RHEL 8 and 9 and Fedora 36 ships Go 1.18, so let's switch to it.

"//go:build" directives are now apparently enforced by go fmt, so that's why
there were added.

Also, all the github actions were adjusted to use Go 1.18.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-01-09 14:03:18 +01:00
..
doc.go worker: use openapi spec and generated code 2020-09-06 18:42:23 +01:00
go.test.sh jobqueue: Introduce jobqueue backed by a postgres database 2021-07-28 21:52:31 +01:00
isatty_bsd.go build(deps): bump github.com/labstack/echo/v4 from 4.5.0 to 4.6.0 2021-09-27 14:35:27 +02:00
isatty_others.go build(deps): bump github.com/labstack/echo/v4 from 4.5.0 to 4.6.0 2021-09-27 14:35:27 +02:00
isatty_plan9.go build(deps): bump github.com/labstack/echo/v4 from 4.5.0 to 4.6.0 2021-09-27 14:35:27 +02:00
isatty_solaris.go build(deps): bump github.com/labstack/echo/v4 from 4.5.0 to 4.6.0 2021-09-27 14:35:27 +02:00
isatty_tcgets.go build(deps): bump github.com/labstack/echo/v4 from 4.5.0 to 4.6.0 2021-09-27 14:35:27 +02:00
isatty_windows.go build(deps): bump github.com/labstack/echo/v4 from 4.5.0 to 4.6.0 2021-09-27 14:35:27 +02:00
LICENSE worker: use openapi spec and generated code 2020-09-06 18:42:23 +01:00
README.md jobqueue: Introduce jobqueue backed by a postgres database 2021-07-28 21:52:31 +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