Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDuration ¶
func ReadPipedInput ¶
func ReadPipedInput() string
ReadPipedInput reads all data from standard input when stdin is being piped, and returns it as a UTF-8 string.
If stdin is attached to an interactive terminal (TTY), there is no piped input, so ReadPipedInput returns an empty string.
This is useful for CLIs that support both:
echo "hello" | cli
and normal interactive usage without blocking on stdin.
On read failure, this function terminates the process via timber.Fatal.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.