Documentation ¶
Overview ¶
Package isatty implements interface to isatty
Example ¶
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") }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsCygwinTerminal ¶ added in v0.0.2
IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 terminal. This is also always false on this environment.
func IsTerminal ¶
IsTerminal return true if the file descriptor is terminal.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.