MCPcopy
hub / github.com/pterm/pterm / Fprinto

Function Fprinto

print.go:176–186  ·  view source on GitHub ↗

Fprinto prints Printo to a custom writer.

(w io.Writer, a ...any)

Source from the content-addressed store, hash-verified

174
175// Fprinto prints Printo to a custom writer.
176func Fprinto(w io.Writer, a ...any) {
177 if !Output {
178 return
179 }
180
181 if w != nil {
182 color.Fprint(w, "\r", Sprint(a...))
183 } else {
184 color.Print("\r", Sprint(a...))
185 }
186}
187
188// RemoveColorFromString removes color codes and OSC 8 hyperlinks from a string.
189func RemoveColorFromString(a ...any) string {

Callers 11

TestFprintoFunction · 0.92
UpdateTextMethod · 0.85
StartMethod · 0.85
StopMethod · 0.85
InfoMethod · 0.85
SuccessMethod · 0.85
FailMethod · 0.85
WarningMethod · 0.85
updateProgressMethod · 0.85
StopMethod · 0.85
fClearLineFunction · 0.85

Calls 2

SprintFunction · 0.85
PrintMethod · 0.65

Tested by 1

TestFprintoFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…