Documentation ¶
Index ¶
- type Level
- type Opt
- func WithAskPrefix(p string) Opt
- func WithAskSecretPrefix(p string) Opt
- func WithColor(use bool) Opt
- func WithErrorPrefix(p string) Opt
- func WithInfoPrefix(p string) Opt
- func WithLevel(l pb.UI_Settings_Level) Opt
- func WithOutputPrefix(p string) Opt
- func WithStderr(stderr io.Writer) Opt
- func WithStdin(stdin io.Reader) Opt
- func WithStdout(stdout io.Writer) Opt
- func WithWarnPrefix(p string) Opt
- func WithWidth(wrap uint) Opt
- type UI
- func (u *UI) Ask(q string) (string, error)
- func (u *UI) AskSecret(q string) (string, error)
- func (u *UI) Debug(m string)
- func (u *UI) Diagnostics(files map[string]*hcl.File, diags hcl.Diagnostics) error
- func (u *UI) Error(m string)
- func (u *UI) Info(m string)
- func (u *UI) Output(m string)
- func (u *UI) RenderTable(header []string, rows [][]string)
- func (u *UI) Warn(m string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opt ¶
type Opt func(*UI)
Opt is a UI option.
func WithAskSecretPrefix ¶
WithAskSecretPrefix sets the ask prefix.
func WithOutputPrefix ¶
WithOutputPrefix sets the output prefix.
type UI ¶
type UI struct { Stderr io.Writer Stdout io.Writer Stdin io.Reader UseColor bool Width uint AskPrefix string AskSecretPrefix string OutputPrefix string InfoPrefix string ErrorPrefix string WarnPrefix string Level pb.UI_Settings_Level // contains filtered or unexported fields }
UI is a CLI UI.
func (*UI) Diagnostics ¶
Diagnostics outputs diagnostics to stderr.
func (*UI) RenderTable ¶
RenderTable does a basic render of table data to the desired writer.
Click to show internal directories.
Click to hide internal directories.