Documentation
¶
Overview ¶
Package prompt runs the review commands' forms, shared by review and its subcommands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotPromptable is returned when nobody can answer the prompts. ErrNotPromptable = errors.NewSentinel("review.not_promptable", "review: an interactive terminal is needed") // ErrInputEnded is returned when piped input runs out mid-verdict. Nothing // is recorded: GTB reports the input running out as setup.ErrInputEnded, // and huh (v2.0.3) panics on an out-of-range choice there; either way the // answer is one nobody gave. ErrInputEnded = errors.NewSentinel("review.input_ended", "review: the input ended before a verdict was given") )
Functions ¶
Types ¶
type Prompter ¶
type Prompter struct {
// contains filtered or unexported fields
}
Prompter runs the forms, and in accessible mode knows when the input ended.
func New ¶
New returns a Prompter over streams. In accessible mode it watches stdin for its end, since that is where huh panics.
Click to show internal directories.
Click to hide internal directories.