package isatty

Import Path
	github.com/mattn/go-isatty (on go.dev)

Dependency Relation
	imports 2 packages, and imported by 2 packages

Involved Source Files Package isatty implements interface to isatty isatty_linux.go isatty_others.go
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, both are exported)
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.
Package-Level Constants (only one, which is unexported)