ui

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const LinkColor = "#87CEEB"

Variables

This section is empty.

Functions

func ColorizeLink(output *termenv.Output, enabled bool, text string) string

Types

type ColorMode

type ColorMode string
const (
	ColorAuto   ColorMode = "auto"
	ColorAlways ColorMode = "always"
	ColorNever  ColorMode = "never"
)

func NormalizeColorMode

func NormalizeColorMode(value string) ColorMode

type UI

type UI struct {
	Out          io.Writer
	Err          io.Writer
	Output       *termenv.Output
	ErrOutput    *termenv.Output
	ColorEnabled bool
}

func New

func New(out io.Writer, err io.Writer, mode ColorMode, disableColor bool) *UI

func (*UI) Errorf

func (u *UI) Errorf(format string, args ...any)

func (*UI) Infof

func (u *UI) Infof(format string, args ...any)

func (*UI) LinkText

func (u *UI) LinkText(text string) string

func (*UI) Successf

func (u *UI) Successf(format string, args ...any)

func (*UI) Warnf

func (u *UI) Warnf(format string, args ...any)

Jump to

Keyboard shortcuts

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