Documentation
¶
Index ¶
- Constants
- func ApiHostValidator(val interface{}) error
- func ValueRequired(val interface{}) error
- type Confirm
- type Prompt
- func (p *Prompt) Ask(q *Question) (result string, ok bool)
- func (p *Prompt) Confirm(c *Confirm) bool
- func (p *Prompt) GetAllowedBranches(allBranches []*model.Branch, isFlagSet bool, flagValue string) model.AllowedBranches
- func (p *Prompt) MultiSelect(s *Select) (result []string, ok bool)
- func (p *Prompt) Multiline(q *Question) (result string, ok bool)
- func (p *Prompt) Printf(format string, a ...interface{})
- func (p *Prompt) Select(s *Select) (value string, ok bool)
- func (p *Prompt) SelectIndex(s *Select) (index int, ok bool)
- type Question
- type Select
Constants ¶
View Source
const ( ModeMainBranch = "only main branch" ModeAllBranches = "all branches" ModeSelectSpecific = "select branches" ModeTypeList = "type IDs or names" )
Variables ¶
This section is empty.
Functions ¶
func ApiHostValidator ¶
func ApiHostValidator(val interface{}) error
func ValueRequired ¶
func ValueRequired(val interface{}) error
Types ¶
type Prompt ¶
type Prompt struct { Interactive bool // is terminal interactive?, can we ask questions? // contains filtered or unexported fields }
func NewPrompt ¶
func NewPrompt(stdin terminal.FileReader, stdout terminal.FileWriter, stderr terminal.FileWriter) *Prompt
func (*Prompt) GetAllowedBranches ¶
Click to show internal directories.
Click to hide internal directories.