lazydocker/vendor/github.com/mattn/go-isatty
2023-05-21 14:06:56 +10:00
..
.travis.yml Allow to render container stats and configs both in json and yaml (#444) 2023-05-21 14:06:56 +10:00
doc.go repurpose lazygit code 2019-05-12 10:32:02 +10:00
go.test.sh Allow to render container stats and configs both in json and yaml (#444) 2023-05-21 14:06:56 +10:00
isatty_bsd.go Allow to render container stats and configs both in json and yaml (#444) 2023-05-21 14:06:56 +10:00
isatty_others.go update dependencies 2019-12-13 11:33:04 +01:00
isatty_plan9.go update dependencies 2019-12-13 11:33:04 +01:00
isatty_solaris.go update dependencies 2019-12-13 11:33:04 +01:00
isatty_tcgets.go Allow to render container stats and configs both in json and yaml (#444) 2023-05-21 14:06:56 +10:00
isatty_windows.go update dependencies 2019-12-13 11:33:04 +01:00
LICENSE repurpose lazygit code 2019-05-12 10:32:02 +10:00
README.md Allow to render container stats and configs both in json and yaml (#444) 2023-05-21 14:06:56 +10:00
renovate.json Allow to render container stats and configs both in json and yaml (#444) 2023-05-21 14:06:56 +10: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