console

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

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

func NewConsole(out, err io.Writer) *Console

NewConsole creates a new instance of the Console struct with provided output and error writers.

func (*Console) Debug

func (c *Console) Debug(message string)

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

func (c *Console) Debugf(format string, a ...interface{})

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

func (c *Console) Error(message string)

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

func (c *Console) Errorf(format string, a ...interface{})

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

func (c *Console) Info(message string)

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

func (c *Console) Infof(format string, a ...interface{})

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.

func (*Console) Warning

func (c *Console) Warning(message string)

Warning prints a warning message to the output writer. The message is prefixed with a yellow warning sign (⚠) icon and ends with a new line.

func (*Console) Warningf

func (c *Console) Warningf(format string, a ...interface{})

Warningf prints a formatted warning message to the output writer. The message is prefixed with a yellow warning sign (⚠) icon and ends with a new line.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL