verbose

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 4 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NopPrinter is a no-op printer.
	//
	// This generally aligns with the --verbose flag not being set.
	NopPrinter = nopPrinter{}
)

Functions

This section is empty.

Types

type Printer

type Printer interface {
	// Printf prints a new verbose message.
	//
	// Leading and trailing newlines are not respected.
	//
	// Callers should not rely on the print calls being reliable, i.e. errors to
	// a backing Writer will be ignored.
	Printf(format string, args ...interface{})
}

Printer prints verbose messages.

func NewWritePrinter

func NewWritePrinter(writer io.Writer, prefix string) Printer

NewWritePrinter returns a new Printer using the given Writer.

The trimmed prefix is printed with a : before each line.

This generally aligns with the --verbose flag being set and writer being stderr.

Jump to

Keyboard shortcuts

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