render

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Renderer

type Renderer interface {
	// Render a formated text message with the Debug log level.
	LogDebug(format string, a ...any)

	// Render a formated text message with the Info log level.
	LogInfo(format string, a ...any)

	// Render a formated text message with the warning log level.
	LogWarning(format string, a ...any)

	// Render a formated text message with the error log level.
	LogError(format string, a ...any)

	// Render a progress bar with a given title and amount of steps. The functions returns a function
	// to increment the progress bar and a function to close the progress bar at the end.
	Progress(title string, steps int) (func(), func())

	// Render a spinner with a given title. The function return a function to close the spinner at the end.
	Spinner(title string) func()

	// Render a table filled with the values from the privided two dimentional slice.
	Table(data [][]string)
}

func CreateRenderer

func CreateRenderer(verbose bool) Renderer

Create a new renderer instance and specify if verbose debug logging should be enabled

Jump to

Keyboard shortcuts

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