package isatty
Import Path
github.com/mattn/go-isatty (on go.dev)
Dependency Relation
imports one package, and imported by 2 packages
Code Examples
{
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")
}
}
Package-Level Functions (total 2)
IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
terminal. This is also always false on this environment.
IsTerminal return true if the file descriptor is terminal.
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |