clio

package
v2.52.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTTYStdin

func GetTTYStdin() *os.File

func HasPipedInput

func HasPipedInput(f *os.File) bool

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

func IsInteractiveTerminal(f *os.File) bool

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

func IsTerminal(f *os.File) bool

IsTerminal checks if the output is a terminal or not

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL