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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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