package isatty
import "github.com/mattn/go-isatty"
Package isatty implements interface to isatty
Code:
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")
}
}
Index ¶
Examples ¶
Functions ¶
func IsCygwinTerminal ¶
IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 terminal.
func IsTerminal ¶
IsTerminal return true if the file descriptor is terminal.
Source Files ¶
- Version
- v0.0.18
- Published
- Mar 22, 2023
- Platform
- windows/amd64
- Imports
- 5 packages
- Last checked
- now –
Tools for package owners.