printer

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: BSD-3-Clause Imports: 7 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 {
	// contains filtered or unexported fields
}

Console provides simple, styled console output using lipgloss for consistent branding.

func New

func New(w io.Writer) *Console

New returns a new Console instance that writes to the given io.Writer.

func (*Console) Error

func (c *Console) Error(msg string)

Error prints an error message with a cross icon and error color.

func (*Console) Info

func (c *Console) Info(msg string)

Info prints an informational message with an info icon and color.

func (*Console) LineBreak

func (c *Console) LineBreak()

LineBreak prints \n to the writer.

func (*Console) List

func (c *Console) List(items ...any)

List prints a simple bullet list with brand colors.

func (*Console) Print

func (c *Console) Print(msg string)

Print writes plain, unstyled text to the console.

func (*Console) Printf

func (c *Console) Printf(msg string, args ...any)

Printf writes plain, unstyled text to the console, with formatting.

func (*Console) Println

func (c *Console) Println(msg string)

Println writes plain, unstyled text to the console, with a linebreak.

func (*Console) SetWriter

func (c *Console) SetWriter(w io.Writer)

SetWriter changes the output writer for the console. Useful for redirecting output in tests or file logs.

func (*Console) Success

func (c *Console) Success(msg string)

Success prints a success message with a checkmark icon and success color.

func (*Console) Table

func (c *Console) Table(headers []string, rows [][]string)

Table prints a styled table with headers and rows.

func (*Console) Tree

func (c *Console) Tree(root string, children ...any)

Tree prints a directory-style tree view.

func (*Console) Warn

func (c *Console) Warn(msg string)

Warn prints a warning message with a warning icon and color.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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