display

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StderrStyles = sync.OnceValue(func() Styles {
	return MakeStyles(StderrRenderer())
})
View Source
var StdoutRenderer = sync.OnceValue(func() *lipgloss.Renderer {
	return lipgloss.DefaultRenderer()
})
View Source
var StdoutStyles = sync.OnceValue(func() Styles {
	return MakeStyles(StdoutRenderer())
})

Functions

func Error deprecated

func Error(args interface{})

Deprecated: uses display.StderrRenderer() Error handles and displays an error message. It formats the error message using the provided arguments.

func Errorf deprecated

func Errorf(format string, args ...interface{})

Deprecated: uses display.StderrRenderer() Errorf formats and displays an error message using the provided format string and arguments.

func Fatal deprecated

func Fatal(args interface{})

Deprecated: uses display.StderrRenderer() Fatal handles and displays a fatal error message. It then exits the program with a status code of 1.

func Fatalf deprecated

func Fatalf(format string, args ...interface{})

Deprecated: uses display.StderrRenderer() Fatalf formats and displays a fatal error message using the provided format string and arguments. It then exits the program with a status code of 1.

func Info

func Info(text string)

Info prints an informational message with the defined style.

func Infof

func Infof(format string, a ...interface{})

Infof formats and prints an informational message with the defined style.

func PrintConfirmation

func PrintConfirmation(action, content string)

func Success

func Success(text string)

Success prints the given text with a success style.

func Successf

func Successf(format string, args ...interface{})

Successf prints the formatted string with a success style.

func Warn

func Warn(text string)

Warn prints the given text with a warning style.

func Warnf

func Warnf(format string, args ...interface{})

Warnf prints the formatted string with a warning style.

Types

type Styles

type Styles struct {
	AppName,
	CliArgs,
	Comment,
	CyclingChars,
	ErrorHeader,
	ErrorDetails,
	ErrPadding,
	Flag,
	FlagComma,
	FlagDesc,
	InlineCode,
	Link,
	Pipe,
	Quote,
	ConversationList,
	SHA1,
	Timeago lipgloss.Style
}

func MakeStyles

func MakeStyles(r *lipgloss.Renderer) (s Styles)

Jump to

Keyboard shortcuts

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