Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTerminal ¶
IsTerminal reports whether f is connected to a terminal (character device).
func ReadPassword ¶
ReadPassword reads a line from f without echoing it to the terminal, for prompting secrets (e.g. API tokens). The trailing newline the user types is not echoed either, so a newline is emitted to stdout afterward to move the cursor to the next line. The returned string excludes the line terminator.
f must be a terminal; callers should gate on IsTerminal before prompting.
Types ¶
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner shows a status line on stderr while a long-running operation is in progress. If stderr is not a terminal, all methods are silent no-ops.
func NewSpinner ¶
NewSpinner creates a spinner that will display label on stderr. If stderr is not a TTY the spinner is inert.