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 ¶ added in v0.1.0
IsTerminal returns true if the file descriptor is a terminal which is always false on js and appengine classic which is a sandboxed PaaS.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.