Documentation ¶
Index ¶
Constants ¶
View Source
const TerminalInterruptCode = 130
TerminalInterruptCode is the exit status for interrupted prompts
Variables ¶
This section is empty.
Functions ¶
func CollectInput ¶
CollectInput gathers a value for the prompt from flag, environment, or input
func CollectSelect ¶
CollectSelect gathers the index of the selected value for a prompt
Types ¶
type Prompt ¶
type Prompt struct { Message string // Promptful message for the input Flag *flag.Flag // Substituting flag, preferred if set Environment string // Related environment variable name Options []string // Available selection options Descriptions []string // Optional option descriptions Hidden bool // Mask any text inputs }
Prompt holds the information needed for gathering inputs
Click to show internal directories.
Click to hide internal directories.