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 {
// Enabled returns true if verbose mode is enabled.
//
// This is false if the Printer is a no-op printer.
Enabled() bool
// 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 ...any)
// contains filtered or unexported methods
}
Printer prints verbose messages.
func NewPrinter ¶ added in v1.32.0
NewPrinter 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.
Click to show internal directories.
Click to hide internal directories.