Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicUI ¶
type BasicUI struct {
// contains filtered or unexported fields
}
BasicUI is an implementation of UI that just outputs to the given writer.
func NewBasicUI ¶
NewBasicUI creates a new BasicUI with dependencies.
func (*BasicUI) Ask ¶
Ask asks the user for input using the given query. The response is returned as the given string, or an error.
func (*BasicUI) AskSecret ¶
AskSecret asks the user for input using the given query, but does not echo the keystrokes to the terminal.
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template represents a view that will be rendered by the UI.
func NewTemplate ¶
func NewTemplate(t string, options ...TemplateOption) *Template
NewTemplate creates a template for rendering a view.
type TemplateOption ¶
type TemplateOption func(TemplateOptions)
TemplateOption captures a tweak that can be applied to the Template.
func OptionColor ¶
func OptionColor(i bool) TemplateOption
OptionColor allows the setting a color option to configure the template.
func OptionFormat ¶
func OptionFormat(i string) TemplateOption
OptionFormat allows the setting a format option to configure the template.
func OptionFunctions ¶
func OptionFunctions(i map[string]interface{}) TemplateOption
OptionFunctions allows the setting a functions option to configure the template.
func OptionName ¶
func OptionName(i string) TemplateOption
OptionName allows the setting a name option to configure the template.