Documentation ¶
Index ¶
- Variables
- func Confirm(ctx context.Context, msg string) (bool, error)
- func ReadLine(ctx context.Context, msg string) (string, error)
- func SelectMultiple(ctx context.Context, msg string, opts []string) ([]int, error)
- func SelectSingle(ctx context.Context, msg string, opts []string) (int, error)
- type Prompt
- type Question
- type QuestionDefault
- type QuestionMode
- type Select
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultPrompt = Prompt{ Verbose: false, } DefaultQuestion = Question{ Strict: false, Mode: QuestionSuffix, Default: true, } DefaultSelect = Select{ Filter: true, Paging: 8, } )
Functions ¶
func SelectMultiple ¶
Types ¶
type Prompt ¶
type Question ¶
type Question struct { Message string // Default value when user just press Enter without any input. Default bool Strict bool Mode QuestionMode }
type QuestionDefault ¶ added in v0.2.2
type QuestionDefault uint8
type QuestionMode ¶ added in v0.2.2
type QuestionMode uint8
const ( QuestionEmpty QuestionMode = iota QuestionSuffix QuestionNewLine )
Click to show internal directories.
Click to hide internal directories.