presenter

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package presenter provides terminal output formatting utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Presenter

type Presenter struct {
	// contains filtered or unexported fields
}

Presenter handles terminal output formatting.

func New

func New(out io.Writer) *Presenter

New creates a new Presenter.

func (*Presenter) Error

func (p *Presenter) Error(format string, args ...interface{})

Error prints an error message.

func (*Presenter) FormatDuration

func (p *Presenter) FormatDuration(d time.Duration) string

FormatDuration formats a duration for display.

func (*Presenter) FormatTime

func (p *Presenter) FormatTime(t time.Time) string

FormatTime formats a time for display.

func (*Presenter) Info

func (p *Presenter) Info(format string, args ...interface{})

Info prints an info message.

func (*Presenter) KeyValue

func (p *Presenter) KeyValue(key string, value interface{})

KeyValue prints a key-value pair.

func (*Presenter) NewTable

func (p *Presenter) NewTable(headers []string) *tablewriter.Table

NewTable creates a new table writer.

func (*Presenter) Newline

func (p *Presenter) Newline()

Newline prints a newline.

func (*Presenter) Print

func (p *Presenter) Print(format string, args ...interface{})

Print prints a formatted string.

func (*Presenter) Println

func (p *Presenter) Println(args ...interface{})

Println prints a line.

func (*Presenter) StatusColor

func (p *Presenter) StatusColor(status string) string

StatusColor returns a colored status string.

func (*Presenter) Success

func (p *Presenter) Success(format string, args ...interface{})

Success prints a success message.

func (*Presenter) Title

func (p *Presenter) Title(title string)

Title prints a title/header.

func (*Presenter) Warning

func (p *Presenter) Warning(format string, args ...interface{})

Warning prints a warning message.

Jump to

Keyboard shortcuts

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