MCPcopy Create free account
hub / github.com/cockroachdb/redact / Fprintf

Function Fprintf

internal/rfmt/print.go:210–216  ·  view source on GitHub ↗

These routines end in 'f' and take a format string. Fprintf formats according to a format specifier and writes to w. It returns the number of bytes written and any write error encountered.

(w io.Writer, format string, a ...interface{})

Source from the content-addressed store, hash-verified

208// Fprintf formats according to a format specifier and writes to w.
209// It returns the number of bytes written and any write error encountered.
210func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
211 p := newPrinter()
212 p.doPrintf(format, a)
213 n, err = w.Write([]byte(p.buf.TakeRedactableBytes()))
214 p.free()
215 return
216}
217
218// Printf formats according to a format specifier and writes to standard output.
219// It returns the number of bytes written and any write error encountered.

Callers 2

FprintfFunction · 0.92
PrintfFunction · 0.70

Calls 5

newPrinterFunction · 0.85
doPrintfMethod · 0.80
TakeRedactableBytesMethod · 0.80
freeMethod · 0.80
WriteMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…