Help us shape the future of Go! Take the 2026 Go Developer Survey

ui

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Overview

Package ui provides user interface utilities for the gwq application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Printer

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

Printer handles output formatting.

func New

func New(config *models.UIConfig) *Printer

New creates a new Printer instance.

func (*Printer) PrintBranches

func (p *Printer) PrintBranches(branches []models.Branch)

PrintBranches displays branches in a formatted table.

func (*Printer) PrintConfig

func (p *Printer) PrintConfig(settings map[string]any)

PrintConfig displays configuration in a formatted manner.

func (*Printer) PrintError

func (p *Printer) PrintError(err error)

PrintError displays an error message.

func (*Printer) PrintInfo

func (p *Printer) PrintInfo(message string)

PrintInfo displays an informational message.

func (*Printer) PrintSuccess

func (p *Printer) PrintSuccess(message string)

PrintSuccess displays a success message.

func (*Printer) PrintWorktreePath

func (p *Printer) PrintWorktreePath(path string)

PrintWorktreePath prints only the worktree path (for cd command).

func (*Printer) PrintWorktrees

func (p *Printer) PrintWorktrees(worktrees []models.Worktree, verbose bool)

PrintWorktrees displays worktrees in a formatted table.

func (*Printer) PrintWorktreesJSON

func (p *Printer) PrintWorktreesJSON(worktrees []models.Worktree) error

PrintWorktreesJSON displays worktrees in JSON format.

func (*Printer) UseIcons added in v0.0.3

func (p *Printer) UseIcons() bool

UseIcons returns whether icon display is enabled.

func (*Printer) UseTildeHome added in v0.0.4

func (p *Printer) UseTildeHome() bool

UseTildeHome returns whether home directory should be displayed as ~.

Jump to

Keyboard shortcuts

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