func fmt.Fprintf
210 uses
fmt (current package)
print.go#L222: func Fprintf(w io.Writer, format string, a ...any) (n int, err error) {
print.go#L233: return Fprintf(os.Stdout, format, a...)
flag
flag.go#L611: fmt.Fprintf(&b, " -%s", flag.Name) // Two spaces before -; see next two comments.
flag.go#L635: fmt.Fprintf(&b, " (default %q)", flag.DefValue)
flag.go#L637: fmt.Fprintf(&b, " (default %v)", flag.DefValue)
flag.go#L686: fmt.Fprintf(f.Output(), "Usage:\n")
flag.go#L688: fmt.Fprintf(f.Output(), "Usage of %s:\n", f.name)
flag.go#L707: fmt.Fprintf(CommandLine.Output(), "Usage of %s:\n", os.Args[0])
go.uber.org/goleak
testmain.go#L65: fmt.Fprintf(_osStderr, "goleak: Errors on successful test run: %v\n", err)
go.uber.org/mock/gomock
callset.go#L108: _, _ = fmt.Fprintf(&callsErrors, "\n%v", err)
callset.go#L119: _, _ = fmt.Fprintf(&callsErrors, "\n%v", err)
callset.go#L122: _, _ = fmt.Fprintf(
callset.go#L128: _, _ = fmt.Fprintf(&callsErrors, "there are no expected calls of the method %q for that receiver", method)
go.uber.org/zap
logger.go#L366: fmt.Fprintf(log.errorOutput, "%v Logger.check error: failed to get caller\n", ent.Time.UTC())
options.go#L128: fmt.Fprintf(log.errorOutput, "failed to IncreaseLevel: %v\n", err)
go.uber.org/zap/zapcore
entry.go#L246: fmt.Fprintf(ce.ErrorOutput, "%v Unsafe CheckedEntry re-use near Entry %+v.\n", ce.Time, ce.Entry)
entry.go#L258: fmt.Fprintf(ce.ErrorOutput, "%v write error: %v\n", ce.Time, err)
go/ast
commentmap.go#L323: fmt.Fprintf(&buf, "\t%p %20s: %s\n", node, s, summary(comment))
print.go#L101: _, err = fmt.Fprintf(p.output, "%6d ", p.line)
print.go#L129: if _, err := fmt.Fprintf(p, format, args...); err != nil {
scope.go#L52: fmt.Fprintf(&buf, "scope %p {", s)
scope.go#L56: fmt.Fprintf(&buf, "\t%s %s\n", obj.Kind, obj.Name)
scope.go#L59: fmt.Fprintf(&buf, "}\n")
go/doc/comment
html.go#L34: fmt.Fprintf(out, "?%T", x)
markdown.go#L42: fmt.Fprintf(out, "?%T", x)
print.go#L204: fmt.Fprintf(out, "?%T", x)
text.go#L59: fmt.Fprintf(&out, "[%s]: %s\n", def.Text, def.URL)
text.go#L85: fmt.Fprintf(out, "?%T\n", x)
go/printer
printer.go#L995: fmt.Fprintf(os.Stderr, "print: unsupported argument %v (%T)\n", arg, arg)
go/scanner
errors.go#L115: fmt.Fprintf(w, "%s\n", e)
errors.go#L118: fmt.Fprintf(w, "%s\n", err)
go/types
errors.go#L97: fmt.Fprintf(&buf, "%s: ", err.check.fset.Position(p.posn.Pos()))
exprstring.go#L35: fmt.Fprintf(buf, "(ast: %T)", x) // nil, ast.BadExpr, ast.KeyValueExpr
methodset.go#L30: fmt.Fprintf(&buf, "\t%s\n", f)
object.go#L514: fmt.Fprintf(buf, "package %s", obj.Name())
object.go#L516: fmt.Fprintf(buf, " (%q)", path)
scope.go#L142: fmt.Fprintf(w, "%s%s scope %p {\n", indn, s.comment, s)
scope.go#L146: fmt.Fprintf(w, "%s%s\n", indn1, s.Lookup(name))
scope.go#L155: fmt.Fprintf(w, "%s}\n", indn)
selection.go#L175: fmt.Fprintf(&buf, ") %s", s.obj.Name())
golang.org/x/exp/apidiff
report.go#L61: if _, err := fmt.Fprintf(w, "%s\n", header); err != nil {
report.go#L66: if _, err := fmt.Fprintf(w, "- %s\n", m); err != nil {
golang.org/x/net/http2
frame.go#L201: fmt.Fprintf(buf, "0x%x", 1<<i)
frame.go#L206: fmt.Fprintf(buf, " stream=%d", h.StreamID)
frame.go#L208: fmt.Fprintf(buf, " len=%d", h.Length)
frame.go#L1672: fmt.Fprintf(&buf, " %v=%v,", s.ID, s.Val)
frame.go#L1684: fmt.Fprintf(&buf, " data=%q", data)
frame.go#L1686: fmt.Fprintf(&buf, " (%d bytes omitted)", len(f.Data())-max)
frame.go#L1692: fmt.Fprintf(&buf, " incr=%v", f.Increment)
frame.go#L1694: fmt.Fprintf(&buf, " ping=%q", f.Data[:])
frame.go#L1696: fmt.Fprintf(&buf, " LastStreamID=%v ErrCode=%v Debug=%q",
frame.go#L1699: fmt.Fprintf(&buf, " ErrCode=%v", f.ErrCode)
golang.org/x/net/trace
events.go#L386: fmt.Fprintf(w, "# %s\t%s:%d\n", name, file, line)
golang.org/x/tools/go/packages
external.go#L144: fmt.Fprintf(os.Stderr, "%s stderr: <<%s>>\n", cmdDebugStr(cmd), stderr)
golang.org/x/tools/go/types/typeutil
map.go#L162: fmt.Fprintf(&buf, ": %q", value)
golang.org/x/tools/internal/event/core
event.go#L44: fmt.Fprintf(f, "\n\t%v", l)
golang.org/x/tools/internal/typeparams
normalize.go#L124: fmt.Fprintf(os.Stderr, strings.Repeat(".", depth)+format+"\n", args...)
google.golang.org/grpc
trace.go#L100: fmt.Fprintf(&line, " %v deadline:", f.remoteAddr)
google.golang.org/grpc/internal/transport
http_util.go#L245: fmt.Fprintf(&sb, "%%%02X", b)
http_util.go#L256: fmt.Fprintf(&sb, "%%%02X", b)
google.golang.org/grpc/peer
peer.go#L53: fmt.Fprintf(sb, "Addr: '%s', ", p.Addr.String())
peer.go#L55: fmt.Fprintf(sb, "Addr: <nil>, ")
peer.go#L58: fmt.Fprintf(sb, "LocalAddr: '%s', ", p.LocalAddr.String())
peer.go#L60: fmt.Fprintf(sb, "LocalAddr: <nil>, ")
peer.go#L63: fmt.Fprintf(sb, "AuthInfo: '%s'", p.AuthInfo.AuthType())
peer.go#L65: fmt.Fprintf(sb, "AuthInfo: <nil>")
google.golang.org/protobuf/reflect/protoregistry
registry.go#L58: fmt.Fprintf(os.Stderr, "WARNING: %v\nSee %v\n\n", err, faq)
gotest.tools/v3/internal/source
source.go#L131: fmt.Fprintf(os.Stderr, "DEBUG: "+format+"\n", args...)
html/template
html.go#L168: fmt.Fprintf(b, "%s&#x%x;", s[written:i], r)
url.go#L134: fmt.Fprintf(b, "%%%02x", c)
internal/buildcfg
cfg.go#L47: fmt.Fprintf(os.Stderr, "%s: %v\n", filepath.Base(os.Args[0]), Error)
math/big
ftoa.go#L479: fmt.Fprintf(s, "%%!%c(*big.Float=%s)", format, x.String())
intconv.go#L80: fmt.Fprintf(s, "%%!%c(big.Int=%s)", ch, x.String())
mime/multipart
writer.go#L106: fmt.Fprintf(&b, "\r\n--%s\r\n", w.boundary)
writer.go#L108: fmt.Fprintf(&b, "--%s\r\n", w.boundary)
writer.go#L113: fmt.Fprintf(&b, "%s: %s\r\n", k, v)
writer.go#L116: fmt.Fprintf(&b, "\r\n")
writer.go#L173: _, err := fmt.Fprintf(w.w, "\r\n--%s--\r\n", w.boundary)
net/http
fs.go#L158: fmt.Fprintf(w, "<!doctype html>\n")
fs.go#L159: fmt.Fprintf(w, "<meta name=\"viewport\" content=\"width=device-width\">\n")
fs.go#L160: fmt.Fprintf(w, "<pre>\n")
fs.go#L170: fmt.Fprintf(w, "<a href=\"%s\">%s</a>\n", url.String(), htmlReplacer.Replace(name))
fs.go#L172: fmt.Fprintf(w, "</pre>\n")
h2_bundle.go#L1769: fmt.Fprintf(buf, "0x%x", 1<<i)
h2_bundle.go#L1774: fmt.Fprintf(buf, " stream=%d", h.StreamID)
h2_bundle.go#L1776: fmt.Fprintf(buf, " len=%d", h.Length)
h2_bundle.go#L3232: fmt.Fprintf(&buf, " %v=%v,", s.ID, s.Val)
h2_bundle.go#L3244: fmt.Fprintf(&buf, " data=%q", data)
h2_bundle.go#L3246: fmt.Fprintf(&buf, " (%d bytes omitted)", len(f.Data())-max)
h2_bundle.go#L3252: fmt.Fprintf(&buf, " incr=%v", f.Increment)
h2_bundle.go#L3254: fmt.Fprintf(&buf, " ping=%q", f.Data[:])
h2_bundle.go#L3256: fmt.Fprintf(&buf, " LastStreamID=%v ErrCode=%v Debug=%q",
h2_bundle.go#L3259: fmt.Fprintf(&buf, " ErrCode=%v", f.ErrCode)
request.go#L673: _, err = fmt.Fprintf(w, "%s %s HTTP/1.1\r\n", valueOrDefault(r.Method, "GET"), ruri)
request.go#L679: _, err = fmt.Fprintf(w, "Host: %s\r\n", host)
request.go#L696: _, err = fmt.Fprintf(w, "User-Agent: %s\r\n", userAgent)
response.go#L259: if _, err := fmt.Fprintf(w, "HTTP/%d.%d %03d %s\r\n", r.ProtoMajor, r.ProtoMinor, r.StatusCode, text); err != nil {
server.go#L383: _, err = fmt.Fprintf(cw.res.conn.bufw, "%x\r\n", len(p))
server.go#L1617: fmt.Fprintf(bw, "%03d status code %d\r\n", code, code)
server.go#L2043: fmt.Fprintf(c.rwc, "HTTP/1.1 "+publicErr+errorHeaders+publicErr)
server.go#L2056: fmt.Fprintf(c.rwc, "HTTP/1.1 %d %s%sUnsupported transfer encoding", code, StatusText(code), errorHeaders)
server.go#L2064: fmt.Fprintf(c.rwc, "HTTP/1.1 %d %s: %s%s%d %s: %s", v.code, StatusText(v.code), v.text, errorHeaders, v.code, StatusText(v.code), v.text)
server.go#L2068: fmt.Fprintf(c.rwc, "HTTP/1.1 "+publicErr+errorHeaders+publicErr)
net/http/httputil
dump.go#L243: fmt.Fprintf(&b, "%s %s HTTP/%d.%d\r\n", valueOrDefault(req.Method, "GET"),
dump.go#L253: fmt.Fprintf(&b, "Host: %s\r\n", host)
dump.go#L259: fmt.Fprintf(&b, "Transfer-Encoding: %s\r\n", strings.Join(req.TransferEncoding, ","))
net/http/internal
chunked.go#L245: if _, err = fmt.Fprintf(cw.Wire, "%x\r\n", len(data)); err != nil {
net/http/pprof
pprof.go#L207: fmt.Fprintf(&buf, "num_symbols: 1\n")
pprof.go#L225: fmt.Fprintf(&buf, "%#x %s\n", pc, f.Name())
pprof.go#L233: fmt.Fprintf(&buf, "reading request: %v\n", err)
pprof.go#L449: fmt.Fprintf(&b, "<tr><td>%d</td><td><a href='%s'>%s</a></td></tr>\n", profile.Count, link, html.EscapeString(profile.Name))
pprof.go#L460: fmt.Fprintf(&b, "<li><div class=profile-name>%s: </div> %s</li>\n", html.EscapeString(profile.Name), html.EscapeString(profile.Desc))
net/textproto
writer.go#L31: fmt.Fprintf(w.W, format, args...)
runtime/debug
mod.go#L109: fmt.Fprintf(buf, "go\t%s\n", bi.GoVersion)
mod.go#L112: fmt.Fprintf(buf, "path\t%s\n", bi.Path)
mod.go#L145: fmt.Fprintf(buf, "build\t%s=%s\n", key, value)
runtime/pprof
pprof.go#L466: fmt.Fprintf(&buf, "@")
pprof.go#L468: fmt.Fprintf(&buf, " %#x", pc)
pprof.go#L494: fmt.Fprintf(tw, "%s profile: total %d\n", name, p.Len())
pprof.go#L496: fmt.Fprintf(tw, "%d %s\n", count[k], k)
pprof.go#L557: fmt.Fprintf(w, "#\t%#x\n", frame.PC)
pprof.go#L562: fmt.Fprintf(w, "#\t%#x\t%s+%#x\t%s:%d\n", frame.PC, name, frame.PC-frame.Entry, frame.File, frame.Line)
pprof.go#L574: fmt.Fprintf(w, "\n")
pprof.go#L671: fmt.Fprintf(w, "heap profile: %d: %d [%d: %d] @ heap/%d\n",
pprof.go#L678: fmt.Fprintf(w, "%d: %d [%d: %d] @",
pprof.go#L682: fmt.Fprintf(w, " %#x", pc)
pprof.go#L684: fmt.Fprintf(w, "\n")
pprof.go#L691: fmt.Fprintf(w, "\n# runtime.MemStats\n")
pprof.go#L692: fmt.Fprintf(w, "# Alloc = %d\n", s.Alloc)
pprof.go#L693: fmt.Fprintf(w, "# TotalAlloc = %d\n", s.TotalAlloc)
pprof.go#L694: fmt.Fprintf(w, "# Sys = %d\n", s.Sys)
pprof.go#L695: fmt.Fprintf(w, "# Lookups = %d\n", s.Lookups)
pprof.go#L696: fmt.Fprintf(w, "# Mallocs = %d\n", s.Mallocs)
pprof.go#L697: fmt.Fprintf(w, "# Frees = %d\n", s.Frees)
pprof.go#L699: fmt.Fprintf(w, "# HeapAlloc = %d\n", s.HeapAlloc)
pprof.go#L700: fmt.Fprintf(w, "# HeapSys = %d\n", s.HeapSys)
pprof.go#L701: fmt.Fprintf(w, "# HeapIdle = %d\n", s.HeapIdle)
pprof.go#L702: fmt.Fprintf(w, "# HeapInuse = %d\n", s.HeapInuse)
pprof.go#L703: fmt.Fprintf(w, "# HeapReleased = %d\n", s.HeapReleased)
pprof.go#L704: fmt.Fprintf(w, "# HeapObjects = %d\n", s.HeapObjects)
pprof.go#L706: fmt.Fprintf(w, "# Stack = %d / %d\n", s.StackInuse, s.StackSys)
pprof.go#L707: fmt.Fprintf(w, "# MSpan = %d / %d\n", s.MSpanInuse, s.MSpanSys)
pprof.go#L708: fmt.Fprintf(w, "# MCache = %d / %d\n", s.MCacheInuse, s.MCacheSys)
pprof.go#L709: fmt.Fprintf(w, "# BuckHashSys = %d\n", s.BuckHashSys)
pprof.go#L710: fmt.Fprintf(w, "# GCSys = %d\n", s.GCSys)
pprof.go#L711: fmt.Fprintf(w, "# OtherSys = %d\n", s.OtherSys)
pprof.go#L713: fmt.Fprintf(w, "# NextGC = %d\n", s.NextGC)
pprof.go#L714: fmt.Fprintf(w, "# LastGC = %d\n", s.LastGC)
pprof.go#L715: fmt.Fprintf(w, "# PauseNs = %d\n", s.PauseNs)
pprof.go#L716: fmt.Fprintf(w, "# PauseEnd = %d\n", s.PauseEnd)
pprof.go#L717: fmt.Fprintf(w, "# NumGC = %d\n", s.NumGC)
pprof.go#L718: fmt.Fprintf(w, "# NumForcedGC = %d\n", s.NumForcedGC)
pprof.go#L719: fmt.Fprintf(w, "# GCCPUFraction = %v\n", s.GCCPUFraction)
pprof.go#L720: fmt.Fprintf(w, "# DebugGC = %v\n", s.DebugGC)
pprof.go#L951: fmt.Fprintf(w, "--- %v:\n", name)
pprof.go#L952: fmt.Fprintf(w, "cycles/second=%v\n", pprof_cyclesPerSecond())
pprof.go#L954: fmt.Fprintf(w, "sampling period=%d\n", runtime.SetMutexProfileFraction(-1))
pprof.go#L959: fmt.Fprintf(w, "%v %v @", r.Cycles, r.Count)
pprof.go#L963: fmt.Fprintf(w, " %#x", pc)
pprof_rusage.go#L33: fmt.Fprintf(w, "# MaxRSS = %d\n", uintptr(rusage.Maxrss)*rssToBytes)
testing
benchmark.go#L249: fmt.Fprintf(b.w, "%s--- FAIL: %s\n%s", b.chatty.prefix(), b.name, b.output)
benchmark.go#L264: fmt.Fprintf(b.w, "%s--- %s: %s\n%s", b.chatty.prefix(), tag, b.name, b.output)
benchmark.go#L277: fmt.Fprintf(b.w, "goos: %s\n", runtime.GOOS)
benchmark.go#L278: fmt.Fprintf(b.w, "goarch: %s\n", runtime.GOARCH)
benchmark.go#L280: fmt.Fprintf(b.w, "pkg: %s\n", b.importPath)
benchmark.go#L283: fmt.Fprintf(b.w, "cpu: %s\n", cpu)
benchmark.go#L584: fmt.Fprintf(buf, "%8d", r.N)
benchmark.go#L597: fmt.Fprintf(buf, "\t%7.2f MB/s", mbs)
benchmark.go#L643: fmt.Fprintf(w, format, x, unit)
benchmark.go#L730: fmt.Fprintf(b.w, "%-*s\t", s.maxLen, benchName)
benchmark.go#L752: fmt.Fprintf(b.w, "%s--- FAIL: %s\n%s", b.chatty.prefix(), benchName, b.output)
benchmark.go#L757: fmt.Fprintf(b.w, "%-*s\t", s.maxLen, benchName)
benchmark.go#L767: fmt.Fprintf(b.w, "%s--- BENCH: %s\n%s", b.chatty.prefix(), benchName, b.output)
benchmark.go#L770: fmt.Fprintf(os.Stderr, "testing: %s left GOMAXPROCS set to %d\n", benchName, p)
cover.go#L78: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
cover.go#L94: fmt.Fprintf(f, "mode: %s\n", cover.Mode)
cover.go#L110: _, err := fmt.Fprintf(f, "%s:%d.%d,%d.%d %d %d\n", name,
fuzz.go#L370: fmt.Fprintf(f.w, "%v\n", err)
fuzz.go#L373: fmt.Fprintf(f.w, "Failing input written to %s\n", crashPath)
fuzz.go#L375: fmt.Fprintf(f.w, "To re-run:\ngo test -run=%s/%s\n", f.name, testName)
fuzz.go#L597: fmt.Fprintf(os.Stderr, "testing: will not fuzz, -fuzz matches more than one fuzz test: %v\n", matched)
match.go#L62: fmt.Fprintf(os.Stderr, "testing: invalid regexp for %s\n", err)
match.go#L71: fmt.Fprintf(os.Stderr, "testing: invalid regexp for %v\n", err)
newcover.go#L44: fmt.Fprintf(os.Stderr, "%s: %v\n", errmsg, err)
run_example.go#L40: fmt.Fprintf(os.Stderr, "testing: copying pipe: %v\n", err)
testing.go#L600: fmt.Fprintf(p.w, p.prefix()+format, args...)
testing.go#L612: fmt.Fprintf(p.w, "%s=== NAME %s\n", p.prefix(), testName)
testing.go#L616: fmt.Fprintf(p.w, format, args...)
testing.go#L822: fmt.Fprintf(buf, "%s:%d: ", file, line)
testing.go#L875: fmt.Fprintf(p.w, c.chatty.prefix()+format, args...)
testing.go#L1730: fmt.Fprintf(root.parent.w, "cleanup panicked with %v", r)
testing.go#L2207: fmt.Fprintf(os.Stderr, "testing: invalid regexp in -test.list (%q): %s\n", *matchList, err)
testing.go#L2302: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
testing.go#L2306: fmt.Fprintf(os.Stderr, "testing: can't start cpu profile: %s\n", err)
testing.go#L2315: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
testing.go#L2319: fmt.Fprintf(os.Stderr, "testing: can't start tracing: %s\n", err)
testing.go#L2332: fmt.Fprintf(os.Stderr, "testing: cannot use -test.coverprofile because test binary was not built with coverage enabled\n")
testing.go#L2336: fmt.Fprintf(os.Stderr, "testing: cannot use -test.gocoverdir because test binary was not built with coverage enabled\n")
testing.go#L2353: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
testing.go#L2381: fmt.Fprintf(os.Stderr, "testing: can't write %s: %s\n", *testlog, err)
testing.go#L2385: fmt.Fprintf(os.Stderr, "testing: can't write %s: %s\n", *testlog, err)
testing.go#L2398: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
testing.go#L2403: fmt.Fprintf(os.Stderr, "testing: can't write %s: %s\n", *memProfile, err)
testing.go#L2411: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
testing.go#L2415: fmt.Fprintf(os.Stderr, "testing: can't write %s: %s\n", *blockProfile, err)
testing.go#L2423: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
testing.go#L2427: fmt.Fprintf(os.Stderr, "testing: can't write %s: %s\n", *mutexProfile, err)
testing.go#L2515: fmt.Fprintf(os.Stderr, "testing: invalid value %q for -test.cpu\n", val)
text/template
exec.go#L248: fmt.Fprintf(&b, "%q", name)
funcs.go#L720: fmt.Fprintf(w, "\\u%04X", r)