ui

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(prompt string, defaultYes bool) (bool, error)

Confirm asks the user for confirmation

func Error

func Error(format string, a ...interface{}) string

Error returns a red error message

func Info

func Info(format string, a ...interface{}) string

Info returns a blue info message

func PrintError

func PrintError(err error, format string, a ...interface{})

PrintError prints an error message

func PrintInfo

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

PrintInfo prints an info message

func PrintSuccess

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

PrintSuccess prints a success message

func PrintWarning

func PrintWarning(format string, a ...interface{})

PrintWarning prints a warning message

func Success

func Success(format string, a ...interface{}) string

Success returns a green success message

func Warning

func Warning(format string, a ...interface{}) string

Warning returns a yellow warning message

Types

type ProgressBar

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

ProgressBar is a simple progress bar implementation

func NewProgressBar

func NewProgressBar(max int, description string) *ProgressBar

NewProgressBar creates a new progress bar

func (*ProgressBar) Add

func (p *ProgressBar) Add(n int) error

Add updates the progress

func (*ProgressBar) Close

func (p *ProgressBar) Close()

Close finishes the progress bar

func (*ProgressBar) Render

func (p *ProgressBar) Render()

Render renders the progress bar

type Spinner

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

Spinner is a simple spinner implementation

func NewSpinner

func NewSpinner(msg string) *Spinner

NewSpinner creates a new spinner

func (*Spinner) Close

func (s *Spinner) Close()

Close finishes the spinner

Jump to

Keyboard shortcuts

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