ui

package
v0.9.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Copyright (c) 2025 Nexlayer. All rights reserved.n// Use of this source code is governed by an MIT-stylen// license that can be found in the LICENSE file.nn

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintError

func PrintError(format string, args ...interface{})

PrintError prints an error message

func PrintHeading

func PrintHeading(format string, args ...interface{})

PrintHeading prints a section heading

func PrintInfo

func PrintInfo(format string, args ...interface{})

PrintInfo prints an informational message

func PrintSuccess

func PrintSuccess(format string, args ...interface{})

PrintSuccess prints a success message

func RenderBox

func RenderBox(text string)

RenderBox renders text in a box

func RenderError

func RenderError(text string)

RenderError renders an error message

func RenderHighlight

func RenderHighlight(text string)

RenderHighlight renders highlighted text

func RenderSuccess

func RenderSuccess(text string)

RenderSuccess renders a success message

func RenderTitleWithBorder

func RenderTitleWithBorder(title string)

RenderTitleWithBorder renders a title with a border

func RenderWarning

func RenderWarning(text string)

RenderWarning renders a warning message

func RenderWelcome

func RenderWelcome(text string)

RenderWelcome renders a welcome message

Types

type ProgressTracker

type ProgressTracker interface {
	Update(progress float64, msg string)
	Complete()
}

ProgressTracker defines the interface for tracking progress

type Spinner

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

Spinner represents a CLI progress spinner

func NewSpinner

func NewSpinner(message string) *Spinner

NewSpinner creates a new CLI spinner

func (*Spinner) Start

func (s *Spinner) Start()

Start begins the spinner animation

func (*Spinner) Stop

func (s *Spinner) Stop()

Stop ends the spinner animation

func (*Spinner) UpdateMessage

func (s *Spinner) UpdateMessage(message string)

UpdateMessage updates the spinner's message

type Table

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

Table represents a formatted table for CLI output

func NewTable

func NewTable() *Table

NewTable creates a new CLI table

func (*Table) AddHeader

func (t *Table) AddHeader(headers ...string)

AddHeader adds column headers to the table

func (*Table) AddRow

func (t *Table) AddRow(cols ...string)

AddRow adds a row to the table

func (*Table) Render

func (t *Table) Render() error

Render prints the table to stdout

Directories

Path Synopsis
Package components provides reusable UI components for the CLI
Package components provides reusable UI components for the CLI
Package styles provides consistent styling for the CLI UI
Package styles provides consistent styling for the CLI UI

Jump to

Keyboard shortcuts

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