Documentation ¶
Index ¶
- type UI
- type WriterUI
- func (w *WriterUI) AskForFloat(label string) (float64, error)
- func (w *WriterUI) AskForInt(label string) (int, error)
- func (w *WriterUI) AskForText(label string) (string, error)
- func (w *WriterUI) DisplayColumns(items []string, columns int)
- func (w *WriterUI) ErrorLinef(pattern string, args ...interface{})
- func (w *WriterUI) Errorf(pattern string, args ...interface{})
- func (w *WriterUI) PrintLinef(pattern string, args ...interface{})
- func (w *WriterUI) Printf(pattern string, args ...interface{})
- func (w *WriterUI) SetMaxInvalidInput(value int)
- func (w *WriterUI) SystemLinef(pattern string, args ...interface{})
- func (w *WriterUI) Systemf(pattern string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UI ¶
type UI interface { AskForText(label string) (string, error) AskForFloat(label string) (float64, error) AskForInt(label string) (int, error) PrintLinef(pattern string, args ...interface{}) SystemLinef(pattern string, args ...interface{}) ErrorLinef(pattern string, args ...interface{}) Printf(pattern string, args ...interface{}) Systemf(pattern string, args ...interface{}) Errorf(pattern string, args ...interface{}) DisplayColumns(items []string, columns int) SetMaxInvalidInput(value int) }
UI ...
type WriterUI ¶
type WriterUI struct {
// contains filtered or unexported fields
}
WriterUI Writer UI type
func NewWriterUI ¶
NewWriterUI creates a UI instance
func (*WriterUI) AskForFloat ¶
AskForFloat requests a float value via stdin from the user
func (*WriterUI) AskForText ¶
AskForText requests input via stdin from the user
func (*WriterUI) DisplayColumns ¶
DisplayColumns prints to stdout the items by columns
func (*WriterUI) ErrorLinef ¶
ErrorLinef requests input via stdin from the user
func (*WriterUI) PrintLinef ¶
PrintLinef requests input via stdin from the user
func (*WriterUI) SetMaxInvalidInput ¶
SetMaxInvalidInput overrides the max invalid input variable
func (*WriterUI) SystemLinef ¶
SystemLinef requests input via stdin from the user
Click to show internal directories.
Click to hide internal directories.