MCPcopy
hub / github.com/pterm/pterm / Sprintln

Method Sprintln

prefix_printer.go:221–227  ·  view source on GitHub ↗

Sprintln formats using the default formats for its operands and returns the resulting string. Spaces are always added between operands and a newline is appended.

(a ...any)

Source from the content-addressed store, hash-verified

219// Sprintln formats using the default formats for its operands and returns the resulting string.
220// Spaces are always added between operands and a newline is appended.
221func (p PrefixPrinter) Sprintln(a ...any) string {
222 if p.Debugger && !PrintDebugMessages {
223 return ""
224 }
225 str := fmt.Sprintln(a...)
226 return p.Sprint(str)
227}
228
229// Sprintf formats according to a format specifier and returns the resulting string.
230func (p PrefixPrinter) Sprintf(format string, a ...any) string {

Callers 1

PrintlnMethod · 0.95

Calls 2

SprintMethod · 0.95
SprintlnMethod · 0.65

Tested by

no test coverage detected