1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-15 04:42:04 +00:00
srs/trunk/3rdparty/srs-bench/vendor/github.com/mattn/go-isatty
Winlin 1545425e06 TEST: Upgrade pion to v3.2.9. (#3567)
------

Co-authored-by: chundonglinlin <chundonglinlin@163.com>
2023-06-05 11:43:41 +08:00
..
.travis.yml GB28181: Support GB28181-2016 protocol. v5.0.74 (#3201) 2022-10-06 17:40:58 +08:00
doc.go GB28181: Support GB28181-2016 protocol. v5.0.74 (#3201) 2022-10-06 17:40:58 +08:00
isatty_android.go TEST: Upgrade pion to v3.2.9. (#3567) 2023-06-05 11:43:41 +08:00
isatty_bsd.go TEST: Upgrade pion to v3.2.9. (#3567) 2023-06-05 11:43:41 +08:00
isatty_others.go TEST: Upgrade pion to v3.2.9. (#3567) 2023-06-05 11:43:41 +08:00
isatty_solaris.go TEST: Upgrade pion to v3.2.9. (#3567) 2023-06-05 11:43:41 +08:00
isatty_tcgets.go TEST: Upgrade pion to v3.2.9. (#3567) 2023-06-05 11:43:41 +08:00
isatty_windows.go TEST: Upgrade pion to v3.2.9. (#3567) 2023-06-05 11:43:41 +08:00
LICENSE GB28181: Support GB28181-2016 protocol. v5.0.74 (#3201) 2022-10-06 17:40:58 +08:00
README.md GB28181: Support GB28181-2016 protocol. v5.0.74 (#3201) 2022-10-06 17:40:58 +08:00

go-isatty

Godoc Reference Build Status 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