Help us shape the future of Go! Take the 2026 Go Developer Survey

ui

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bold

func Bold(s string) string

Bold returns a bold string.

func Cyan

func Cyan(s string) string

Cyan returns a cyan-colored string.

func Dim

func Dim(s string) string

Dim returns a dimmed string.

func Error

func Error(msg string)

Error prints a red error message with an X.

func Green

func Green(s string) string

Green returns a green-colored string.

func Header(msg string)

Header prints a bold section header.

func Info

func Info(msg string)

Info prints a cyan informational message.

func PrintJSON

func PrintJSON(v interface{}) error

PrintJSON pretty-prints a value as JSON.

func Red

func Red(s string) string

Red returns a red-colored string.

func StatusColor

func StatusColor(status string) string

StatusColor returns a colored status string.

func Step

func Step(msg string)

Step prints an in-progress step message (→ message).

func Success

func Success(msg string)

Success prints a green success message with a checkmark.

func Table

func Table(headers []string, rows [][]string)

Table renders a table to stdout.

func Warning

func Warning(msg string)

Warning prints a yellow warning message.

func Yellow

func Yellow(s string) string

Yellow returns a yellow-colored string.

Types

type Spinner

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

Spinner is a simple terminal spinner.

func NewSpinner

func NewSpinner(msg string) *Spinner

NewSpinner creates a new spinner with the given message.

func (*Spinner) Fail

func (s *Spinner) Fail(errMsg string)

Fail halts the spinner and prints an error message.

func (*Spinner) Start

func (s *Spinner) Start()

Start begins rendering the spinner in a goroutine.

func (*Spinner) Stop

func (s *Spinner) Stop(successMsg string)

Stop halts the spinner and prints a success message.

Jump to

Keyboard shortcuts

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