Documentation ¶
Overview ¶
Package isatty determine whether the stream is a tty.
Features ¶
- Supports most platforms - Supports force override using environment variable `FORCE_TTY`
Usage ¶
import "gopkg.ilharper.com/x/isatty" if isatty.Isatty(os.Stdout.Fd()) { // TTY } else { // Not TTY }
Using `FORCE_TTY` ¶
User can override the result using the environment variable `FORCE_TTY`.
# Force TTY FORCE_TTY= FORCE_TTY=1 FORCE_TTY=true # Force not TTY FORCE_TTY=0 FORCE_TTY=false
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.