Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTTYStdin ¶
func HasPipedInput ¶
HasPipedInput checks if os.Stdin is receiving piped input. It does this by checking the file mode of os.Stdin. A named pipe (FIFO) typically indicates piped input. A character device indicates an interactive terminal. Any other mode might indicate a redirected file or other non-interactive source.
func IsInteractiveTerminal ¶
IsInteractiveTerminal checks if os.Stdin is connected to an interactive terminal. This is true if the stdin is a character device.
func IsLastInPipeline ¶
func IsLastInPipeline() bool
IsLastInPipeline checks if a command is the last in the pipeline The check isn't perfect, however it is a good enough check if data is being written to the console or not
func IsTerminal ¶
IsTerminal checks if the output is a terminal or not
Types ¶
This section is empty.