Documentation
¶
Index ¶
- type ConsoleUi
- func (c *ConsoleUi) Input(prompt string) (string, error)
- func (c *ConsoleUi) NewProgressBar() uitypes.ProgressBar
- func (c *ConsoleUi) Output(output string) error
- func (c *ConsoleUi) OutputError(err error, opts ...uitypes.Opts) error
- func (c *ConsoleUi) SelectOptions(prompt string, options []string) (int, string, error)
- type Option
- type ProgressType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsoleUi ¶
type ConsoleUi struct {
// contains filtered or unexported fields
}
ConsoleUi is a console-based implementation of UserInterface.
func (*ConsoleUi) NewProgressBar ¶
func (c *ConsoleUi) NewProgressBar() uitypes.ProgressBar
func (*ConsoleUi) OutputError ¶
type Option ¶
type Option func(*ConsoleUi)
Option is a functional option for configuring ConsoleUi.
func WithErrorOutput ¶
WithErrorOutput sets the error output writer.
func WithProgressWriter ¶
WithProgressWriter sets the progress bar writer.
type ProgressType ¶
type ProgressType string
ProgressType defines the type of progress bar.
const ( SpinnerType ProgressType = "spinner" BarType ProgressType = "bar" )
Click to show internal directories.
Click to hide internal directories.