Documentation ¶
Overview ¶
Example ¶
package main import ( "fmt" "os" "github.com/akyoto/tty" ) func main() { if tty.IsTerminal(os.Stdout.Fd()) { fmt.Println("Is a terminal") } else { fmt.Println("Is not a terminal") } }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTerminal ¶
IsTerminal return true if the file descriptor is a terminal.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.