display

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fail

func Fail(a any)

func FormatClickableURL added in v1.8.1

func FormatClickableURL(url string) string

FormatClickableURL formats a URL as a clickable terminal link using OSC 8 escape sequences Falls back to underlined turquoise URL if terminal doesn't support OSC 8

func FormatClickableUUID added in v1.8.1

func FormatClickableUUID(uuid string) string

FormatClickableUUID formats a UUID as a clickable link to shipyard.build details page Falls back to plain UUID if terminal doesn't support OSC 8

func FormatClickableUUIDWithBackground added in v1.8.1

func FormatClickableUUIDWithBackground(uuid string, bgColor *color.Color) string

FormatClickableUUIDWithBackground formats a UUID with background color for duplicates

func FormatColoredAppName added in v1.8.1

func FormatColoredAppName(appName string) string

FormatColoredAppName assigns a consistent color to app names based on hash

func FormatPRNumber added in v1.8.1

func FormatPRNumber(prNumber, branchName string) string

FormatPRNumber formats PR numbers, using branch name for null values

func FormatReadyStatus added in v1.8.1

func FormatReadyStatus(ready bool) string

FormatReadyStatus formats a boolean Ready status with colors

func FormattedEnvironment

func FormattedEnvironment(env *types.Environment) [][]string

FormattedEnvironment takes an environment, extracts data from it, and prepares it to be in tabular format. If the environment value is nil, the program will panic.

func FormattedEnvironmentWithDuplicateColors added in v1.8.1

func FormattedEnvironmentWithDuplicateColors(env *types.Environment, duplicateColors map[string]*color.Color) [][]string

FormattedEnvironmentWithDuplicateColors takes an environment and duplicate color mapping, extracts data from it, and prepares it to be in tabular format with background colors for duplicate UUIDs.

func GenerateDuplicateColors added in v1.8.1

func GenerateDuplicateColors(duplicateUUIDs map[string]bool) map[string]*color.Color

GenerateDuplicateColors creates consistent background colors for duplicate UUIDs

func GetDuplicateUUIDs added in v1.8.1

func GetDuplicateUUIDs(envs []types.Environment) map[string]bool

GetDuplicateUUIDs identifies UUIDs that appear more than once in the final table

func Print

func Print(a any)

func Println

func Println(a any)

func RenderTable

func RenderTable(out io.Writer, columns []string, data [][]string)

RenderTable writes data in tabular form with given column names to the provided writer.

Types

type Display

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

func New

func New(writer, errorWriter io.Writer) Display

func (Display) Fail

func (sw Display) Fail(a any) error

func (Display) Print

func (sw Display) Print(a any) error

func (Display) Println

func (sw Display) Println(a any) error

type Spinner added in v1.8.0

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

Spinner represents a terminal spinner animation

func NewSpinner added in v1.8.0

func NewSpinner(message string) *Spinner

NewSpinner creates a new spinner with the given message

func (*Spinner) SetMessage added in v1.8.0

func (s *Spinner) SetMessage(message string)

SetMessage updates the spinner message while it's running

func (*Spinner) Start added in v1.8.0

func (s *Spinner) Start()

Start begins the spinner animation

func (*Spinner) Stop added in v1.8.0

func (s *Spinner) Stop()

Stop ends the spinner animation and clears the line

Jump to

Keyboard shortcuts

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