MCPcopy
hub / github.com/pterm/pterm / GetWriter

Method GetWriter

prefix_printer.go:341–346  ·  view source on GitHub ↗

GetWriter returns the Writer if set, otherwise defaultWriter.

()

Source from the content-addressed store, hash-verified

339
340// GetWriter returns the Writer if set, otherwise defaultWriter.
341func (p PrefixPrinter) GetWriter() io.Writer {
342 if p.Writer != nil {
343 return p.Writer
344 }
345 return defaultWriter
346}
347
348// Prefix contains the data used as the beginning of a printed text via a PrefixPrinter.
349type Prefix struct {

Callers 6

PrintMethod · 0.95
PrintlnMethod · 0.95
PrintfMethod · 0.95
PrintflnMethod · 0.95

Calls

no outgoing calls

Tested by 2