ui

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTTY

func IsTTY(w io.Writer) bool

func IsTTYReader added in v0.0.7

func IsTTYReader(r io.Reader) bool

IsTTYReader reports whether r is an interactive terminal.

func OverlayPopup added in v0.0.15

func OverlayPopup(base string, popup string, width int) string

OverlayPopup splices a popup box onto a base frame of the given width, centered vertically. The base rows the popup covers become plain text outside the popup (the popup's background masks them); every other row keeps its styling.

func PadLinesTo added in v0.0.15

func PadLinesTo(lines []string, w int) []string

func PadToWidth added in v0.0.15

func PadToWidth(s string, w int) string

Types

type Output

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

func NewOutput

func NewOutput(isTTY bool) *Output

func (*Output) Color

func (o *Output) Color(color, msg string) string

Jump to

Keyboard shortcuts

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