message

package
v0.68.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Overview

Package message provides a rich set of functions for displaying messages to the user.

Index

Constants

View Source
const (
	// TermWidth sets the width of full width elements like progressbars and headers
	TermWidth = 100
)

Variables

View Source
var (
	// NoProgress tracks whether spinner/progress bars show updates.
	NoProgress bool
	// RuleLine creates a line of ━ as wide as the terminal
	RuleLine = strings.Repeat("━", TermWidth)
	// OutputWriter provides a default writer to Stdout for user-focused output like tables and yaml
	OutputWriter = os.Stdout
)

Functions

func ColorEnabled

func ColorEnabled() bool

ColorEnabled returns true if color printing is enabled.

func HorizontalRule

func HorizontalRule()

HorizontalRule prints a white horizontal rule to separate the terminal

func InitializePTerm

func InitializePTerm(w io.Writer)

InitializePTerm sets the default styles and output for pterm.

func Table

func Table(header []string, data [][]string)

Table prints a padded table containing the specified header and data

func TableWithWriter added in v0.44.0

func TableWithWriter(writer io.Writer, header []string, data [][]string)

TableWithWriter prints a padded table containing the specified header and data to the optional writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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