print

package
v12.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package print outputs complex data structures to the CLI.

Index

Constants

This section is empty.

Variables

View Source
var Bold = termenv.String().Bold() //nolint:gochecknoglobals
View Source
var NoFinalMessages = []string{} //nolint:gochecknoglobals

NoFinalMessages can be used by callers of PrintFooter to indicate that the command has no final messages to print.

Functions

func Entry

func Entry(label, value string)

func Error

func Error(err error)

Error prints the given error message to the console.

func Footer(verbose bool, commandsCount int, finalMessages []string)
func Header(text string)

func LabelAndValue

func LabelAndValue(label, value string)

LabelAndValue prints the label bolded and underlined the value indented on the next line followed by an empty line.

Types

type Logger

type Logger struct{}

The Logger logger logs activities of a particular component on the CLI.

func (Logger) Failed

func (l Logger) Failed(failure error)

func (Logger) Start

func (l Logger) Start(template string, data ...interface{})

func (Logger) Success

func (l Logger) Success()

Jump to

Keyboard shortcuts

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