Documentation
¶
Index ¶
- type Console
- func (c *Console) Debug(message string)
- func (c *Console) Debugf(format string, a ...interface{})
- func (c *Console) Error(message string)
- func (c *Console) Errorf(format string, a ...interface{})
- func (c *Console) Info(message string)
- func (c *Console) Infof(format string, a ...interface{})
- func (c *Console) Warning(message string)
- func (c *Console) Warningf(format string, a ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Console ¶
type Console struct {
IsDebug bool // IsDebug indicates whether debug messages should be printed.
// contains filtered or unexported fields
}
Console is a struct used to handle formatted output of messages.
func NewConsole ¶
NewConsole creates a new instance of the Console struct with provided output and error writers.
func (*Console) Debug ¶
Debug prints a debug message to the output writer if debugging is enabled. The message is prefixed with a blue "DEBUG" label and ends with a new line.
func (*Console) Debugf ¶
Debugf prints a formatted debug message to the output writer if debugging is enabled. The message is prefixed with a blue "DEBUG" label and ends with a new line.
func (*Console) Error ¶
Error prints an error message to the error writer. The message is prefixed with a red cross (✖) icon and ends with a new line.
func (*Console) Errorf ¶
Errorf prints a formatted error message to the error writer. The message is prefixed with a red cross (✖) icon and ends with a new line.
func (*Console) Info ¶
Info prints an informational message to the output writer. The message is prefixed with a green check mark (✔) icon and ends with a new line.
func (*Console) Infof ¶
Infof prints a formatted informational message to the output writer. The message is prefixed with a green check mark (✔) icon and ends with a new line.