Documentation ¶
Index ¶
- func Ask(prompt string) string
- func AskPassword(prompt string) string
- func Msg(label, message string, colour color.Attribute, wrapWidth int) string
- func PrintErrorMessage(label, message string)
- func PrintlnErrorMessage(label, message string)
- type CaptureError
- type CapturingPassThroughWriter
- type ConfigurationError
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ask ¶
Ask can be used to get some input from the user. The user input will not be hidden (not secure).
func AskPassword ¶
AskPassword asks password from the user and hides the input.
func PrintErrorMessage ¶
func PrintErrorMessage(label, message string)
PrintErrorMessage displays an error message using Msg without newline at the end.
func PrintlnErrorMessage ¶
func PrintlnErrorMessage(label, message string)
PrintlnErrorMessage displays an error message using Msg with newline at the end.
Types ¶
type CaptureError ¶ added in v1.1.13
CaptureError occurs when something went wrong with capturing io.
func (CaptureError) Error ¶ added in v1.1.13
func (e CaptureError) Error() string
type CapturingPassThroughWriter ¶
type CapturingPassThroughWriter struct {
// contains filtered or unexported fields
}
CapturingPassThroughWriter is a writer that remembers data written to it and passes it to w.
func NewCapturingPassThroughWriter ¶
func NewCapturingPassThroughWriter(w io.Writer) *CapturingPassThroughWriter
NewCapturingPassThroughWriter creates new CapturingPassThroughWriter.
func (*CapturingPassThroughWriter) Bytes ¶
func (w *CapturingPassThroughWriter) Bytes() []byte
Bytes returns bytes written to the writer.
type ConfigurationError ¶
ConfigurationError occurs when something went wrong reading the configuration file.
func (ConfigurationError) Error ¶
func (e ConfigurationError) Error() string
type Manager ¶
type Manager struct {
Namespace string
}
Manager is a central manager, mostly for configuration files, later others like cache, persistent storage, etc.
func (*Manager) ReadConfiguration ¶
ReadConfiguration reads and parses the configuration file.