Documentation
¶
Overview ¶
Package stdin provides simple utilities for reading from stdin, as well as determining if stdin is a terminal or if something has been piped to it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasInput ¶
func HasInput() bool
HasInput reports true when stdin is **not** a terminal. This covers pipes (echo foo | app), file redirects (app < file), and CI/dev‑null situations. It never blocks.
func IsInteractive ¶
func IsInteractive() bool
IsInteractive reports whether the program is attached to a real terminal.
func MaybePiped ¶
MaybePiped checks if something has been piped to stdin.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.