MCPcopy
hub / github.com/pterm/pterm / Print

Method Print

prefix_printer.go:249–259  ·  view source on GitHub ↗

Print formats using the default formats for its operands and writes to standard output. Spaces are added between operands when neither is a string. It returns the number of bytes written and any write error encountered.

(a ...any)

Source from the content-addressed store, hash-verified

247// Spaces are added between operands when neither is a string.
248// It returns the number of bytes written and any write error encountered.
249func (p *PrefixPrinter) Print(a ...any) *TextPrinter {
250 tp := TextPrinter(p)
251 if p.Debugger && !PrintDebugMessages {
252 return &tp
253 }
254 p.LineNumberOffset--
255 Fprint(p.GetWriter(), p.Sprint(a...))
256 p.LineNumberOffset++
257 checkFatal(p)
258 return &tp
259}
260
261// Println formats using the default formats for its operands and writes to standard output.
262// Spaces are always added between operands and a newline is appended.

Callers

nothing calls this directly

Calls 5

GetWriterMethod · 0.95
SprintMethod · 0.95
TextPrinterInterface · 0.85
FprintFunction · 0.85
checkFatalFunction · 0.85

Tested by

no test coverage detected