ui

package
v1.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Reset  = "\x1b[0m"
	Bold   = "\x1b[1m"
	Dim    = "\x1b[38;5;243m"
	Text   = "\x1b[38;5;159m"
	Cyan   = "\x1b[36m"
	Yellow = "\x1b[33m"
	Green  = "\x1b[32m"
	Red    = "\x1b[31m"
)

ANSI color/format constants (exported)

Variables

This section is empty.

Functions

func Intro

func Intro(title string)

func LogError

func LogError(msg string)

func LogInfo

func LogInfo(msg string)

func LogSuccess

func LogSuccess(msg string)

func LogWarn

func LogWarn(msg string)

func Note

func Note(content, title string)

func Outro

func Outro(message string)

func UiConfirm

func UiConfirm(message string) (bool, bool)

func UiMultiselect

func UiMultiselect(message string, options []UIOption, required bool, initialSelected []int, locked []int) ([]int, bool)

func UiSearchMultiselect

func UiSearchMultiselect(message string, options []UIOption, locked []UIOption, initialSelected []int) ([]int, bool)

func UiSelect

func UiSelect(message string, options []UIOption) (int, bool)

func UiSelectWithContext added in v1.5.4

func UiSelectWithContext(message, header string, options []UIOption) (int, bool)

Types

type Spinner

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

func NewSpinner

func NewSpinner(msg string) *Spinner

func (*Spinner) Stop

func (s *Spinner) Stop(msg string)

type UIOption

type UIOption struct {
	Label string
	Value string
	Hint  string
}

Jump to

Keyboard shortcuts

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