func fmt.Fprintf
220 uses
fmt (current package)
print.go#L202: func Fprintf(w io.Writer, format string, a ...any) (n int, err error) {
print.go#L213: return Fprintf(os.Stdout, format, a...)
expvar
expvar.go#L115: fmt.Fprintf(&b, "{")
expvar.go#L119: fmt.Fprintf(&b, ", ")
expvar.go#L121: fmt.Fprintf(&b, "%q: %v", kv.Key, kv.Value)
expvar.go#L124: fmt.Fprintf(&b, "}")
expvar.go#L334: fmt.Fprintf(w, "{\n")
expvar.go#L338: fmt.Fprintf(w, ",\n")
expvar.go#L341: fmt.Fprintf(w, "%q: %s", kv.Key, kv.Value)
expvar.go#L343: fmt.Fprintf(w, "\n}\n")
flag
flag.go#L512: fmt.Fprintf(&b, " -%s", flag.Name) // Two spaces before -; see next two comments.
flag.go#L532: fmt.Fprintf(&b, " (default %q)", flag.DefValue)
flag.go#L534: fmt.Fprintf(&b, " (default %v)", flag.DefValue)
flag.go#L569: fmt.Fprintf(f.Output(), "Usage:\n")
flag.go#L571: fmt.Fprintf(f.Output(), "Usage of %s:\n", f.name)
flag.go#L590: fmt.Fprintf(CommandLine.Output(), "Usage of %s:\n", os.Args[0])
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream
decode.go#L101: fmt.Fprintf(w, "Raw message:\n%s\n",
decode.go#L105: fmt.Fprintf(w, "decodeMessage error: %v\n", decodeErr)
decode.go#L111: fmt.Fprintf(w, "failed to create raw message, %v\n", err)
decode.go#L120: fmt.Fprintf(w, "Decoded message:\n")
decode.go#L123: fmt.Fprintf(w, "failed to generate decoded message, %v\n", err)
encode.go#L100: fmt.Fprintf(w, "Message to encode:\n")
encode.go#L103: fmt.Fprintf(w, "Failed to get encoded message, %v\n", err)
encode.go#L107: fmt.Fprintf(w, "Encode error: %v\n", encodeErr)
encode.go#L111: fmt.Fprintf(w, "Raw message:\n%s\n", hex.Dump(msgBuf.Bytes()))
github.com/aws/smithy-go
validation.go#L46: fmt.Fprintf(w, "%d validation error(s) found.\n", len(e.errs))
validation.go#L49: fmt.Fprintf(w, "- %s\n", err.Error())
github.com/aws/smithy-go/encoding/httpbinding
path_replace.go#L89: fmt.Fprintf(&buf, "%%%02X", c)
github.com/aws/smithy-go/time
time.go#L108: fmt.Fprintf(&s, "\n * %q: %v", e.Format, e.Err)
github.com/golang/mock/gomock
callset.go#L76: _, _ = fmt.Fprintf(&callsErrors, "\n%v", err)
callset.go#L87: _, _ = fmt.Fprintf(&callsErrors, "\n%v", err)
callset.go#L90: _, _ = fmt.Fprintf(
callset.go#L96: _, _ = fmt.Fprintf(&callsErrors, "there are no expected calls of the method %q for that receiver", method)
github.com/golang/protobuf/proto
text_encode.go#L434: fmt.Fprintf(w, "/* %d unknown bytes */\n", len(b))
text_encode.go#L484: fmt.Fprintf(w, "%q", v)
text_encode.go#L489: fmt.Fprintf(w, "/* unknown wire type %d */", wtyp)
text_encode.go#L541: fmt.Fprintf(w, "[%s]:", name)
go.uber.org/goleak
testmain.go#L65: fmt.Fprintf(_osStderr, "goleak: Errors on successful test run: %v\n", err)
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#L336: 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#L53: fmt.Fprintf(&buf, "scope %p {", s)
scope.go#L57: fmt.Fprintf(&buf, "\t%s %s\n", obj.Kind, obj.Name)
scope.go#L60: fmt.Fprintf(&buf, "}\n")
go/printer
printer.go#L981: fmt.Fprintf(os.Stderr, "print: unsupported argument %v (%T)\n", arg, arg)
go/scanner
errors.go#L119: fmt.Fprintf(w, "%s\n", e)
errors.go#L122: fmt.Fprintf(w, "%s\n", err)
go/types
methodset.go#L30: fmt.Fprintf(&buf, "\t%s\n", f)
object.go#L404: fmt.Fprintf(buf, "package %s", obj.Name())
object.go#L406: fmt.Fprintf(buf, " (%q)", path)
scope.go#L218: fmt.Fprintf(w, "%s%s scope %p {\n", indn, s.comment, s)
scope.go#L222: fmt.Fprintf(w, "%s%s\n", indn1, s.Lookup(name))
scope.go#L231: fmt.Fprintf(w, "%s}\n", indn)
selection.go#L135: 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#L1628: fmt.Fprintf(&buf, " %v=%v,", s.ID, s.Val)
frame.go#L1640: fmt.Fprintf(&buf, " data=%q", data)
frame.go#L1642: fmt.Fprintf(&buf, " (%d bytes omitted)", len(f.Data())-max)
frame.go#L1648: fmt.Fprintf(&buf, " incr=%v", f.Increment)
frame.go#L1650: fmt.Fprintf(&buf, " ping=%q", f.Data[:])
frame.go#L1652: fmt.Fprintf(&buf, " LastStreamID=%v ErrCode=%v Debug=%q",
frame.go#L1655: 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#L92: fmt.Fprintf(os.Stderr, "%s stderr: <<%s>>\n", cmdDebugStr(cmd), stderr)
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...)
golang.org/x/tools/txtar
archive.go#L61: fmt.Fprintf(&buf, "-- %s --\n", f.Name)
google.golang.org/grpc
trace.go#L80: fmt.Fprintf(&line, " %v deadline:", f.remoteAddr)
google.golang.org/grpc/internal/transport
http_util.go#L259: fmt.Fprintf(&sb, "%%%02X", b)
http_util.go#L270: fmt.Fprintf(&sb, "%%%02X", b)
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#L163: fmt.Fprintf(b, "%s&#x%x;", s[written:i], r)
url.go#L135: fmt.Fprintf(b, "%%%02x", c)
internal/buildcfg
cfg.go#L44: fmt.Fprintf(os.Stderr, "%s: %v\n", filepath.Base(os.Args[0]), Error)
math/big
ftoa.go#L486: fmt.Fprintf(s, "%%!%c(*big.Float=%s)", format, x.String())
intconv.go#L81: fmt.Fprintf(s, "%%!%c(big.Int=%s)", ch, x.String())
mime/multipart
writer.go#L105: fmt.Fprintf(&b, "\r\n--%s\r\n", w.boundary)
writer.go#L107: fmt.Fprintf(&b, "--%s\r\n", w.boundary)
writer.go#L117: fmt.Fprintf(&b, "%s: %s\r\n", k, v)
writer.go#L120: fmt.Fprintf(&b, "\r\n")
writer.go#L177: _, err := fmt.Fprintf(w.w, "\r\n--%s--\r\n", w.boundary)
net/http
fs.go#L152: fmt.Fprintf(w, "<pre>\n")
fs.go#L162: fmt.Fprintf(w, "<a href=\"%s\">%s</a>\n", url.String(), htmlReplacer.Replace(name))
fs.go#L164: fmt.Fprintf(w, "</pre>\n")
h2_bundle.go#L1530: fmt.Fprintf(buf, "0x%x", 1<<i)
h2_bundle.go#L1535: fmt.Fprintf(buf, " stream=%d", h.StreamID)
h2_bundle.go#L1537: fmt.Fprintf(buf, " len=%d", h.Length)
h2_bundle.go#L2950: fmt.Fprintf(&buf, " %v=%v,", s.ID, s.Val)
h2_bundle.go#L2962: fmt.Fprintf(&buf, " data=%q", data)
h2_bundle.go#L2964: fmt.Fprintf(&buf, " (%d bytes omitted)", len(f.Data())-max)
h2_bundle.go#L2970: fmt.Fprintf(&buf, " incr=%v", f.Increment)
h2_bundle.go#L2972: fmt.Fprintf(&buf, " ping=%q", f.Data[:])
h2_bundle.go#L2974: fmt.Fprintf(&buf, " LastStreamID=%v ErrCode=%v Debug=%q",
h2_bundle.go#L2977: fmt.Fprintf(&buf, " ErrCode=%v", f.ErrCode)
request.go#L611: _, err = fmt.Fprintf(w, "%s %s HTTP/1.1\r\n", valueOrDefault(r.Method, "GET"), ruri)
request.go#L617: _, err = fmt.Fprintf(w, "Host: %s\r\n", host)
request.go#L632: _, err = fmt.Fprintf(w, "User-Agent: %s\r\n", userAgent)
response.go#L257: if _, err := fmt.Fprintf(w, "HTTP/%d.%d %03d %s\r\n", r.ProtoMajor, r.ProtoMinor, r.StatusCode, text); err != nil {
server.go#L377: _, err = fmt.Fprintf(cw.res.conn.bufw, "%x\r\n", len(p))
server.go#L1525: fmt.Fprintf(bw, "%03d status code %d\r\n", code, code)
server.go#L1907: fmt.Fprintf(c.rwc, "HTTP/1.1 "+publicErr+errorHeaders+publicErr)
server.go#L1920: fmt.Fprintf(c.rwc, "HTTP/1.1 %d %s%sUnsupported transfer encoding", code, StatusText(code), errorHeaders)
server.go#L1928: 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#L1932: fmt.Fprintf(c.rwc, "HTTP/1.1 "+publicErr+errorHeaders+publicErr)
net/http/httptest
server.go#L258: fmt.Fprintf(&buf, " %T %p %v in state %v\n", c, c, c.RemoteAddr(), st)
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, ","))
dump.go#L262: fmt.Fprintf(&b, "Connection: close\r\n")
net/http/internal
chunked.go#L209: if _, err = fmt.Fprintf(cw.Wire, "%x\r\n", len(data)); err != nil {
net/http/pprof
pprof.go#L189: fmt.Fprintf(&buf, "num_symbols: 1\n")
pprof.go#L207: fmt.Fprintf(&buf, "%#x %s\n", pc, f.Name())
pprof.go#L215: fmt.Fprintf(&buf, "reading request: %v\n", err)
pprof.go#L429: 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#L440: 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#L79: fmt.Fprintf(buf, "go\t%s\n", bi.GoVersion)
mod.go#L82: fmt.Fprintf(buf, "path\t%s\n", bi.Path)
mod.go#L115: fmt.Fprintf(buf, "build\t%s=%s\n", key, value)
runtime/pprof
pprof.go#L410: fmt.Fprintf(&buf, "@")
pprof.go#L412: fmt.Fprintf(&buf, " %#x", pc)
pprof.go#L438: fmt.Fprintf(tw, "%s profile: total %d\n", name, p.Len())
pprof.go#L440: fmt.Fprintf(tw, "%d %s\n", count[k], k)
pprof.go#L501: fmt.Fprintf(w, "#\t%#x\n", frame.PC)
pprof.go#L506: 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#L518: fmt.Fprintf(w, "\n")
pprof.go#L598: fmt.Fprintf(w, "heap profile: %d: %d [%d: %d] @ heap/%d\n",
pprof.go#L605: fmt.Fprintf(w, "%d: %d [%d: %d] @",
pprof.go#L609: fmt.Fprintf(w, " %#x", pc)
pprof.go#L611: fmt.Fprintf(w, "\n")
pprof.go#L618: fmt.Fprintf(w, "\n# runtime.MemStats\n")
pprof.go#L619: fmt.Fprintf(w, "# Alloc = %d\n", s.Alloc)
pprof.go#L620: fmt.Fprintf(w, "# TotalAlloc = %d\n", s.TotalAlloc)
pprof.go#L621: fmt.Fprintf(w, "# Sys = %d\n", s.Sys)
pprof.go#L622: fmt.Fprintf(w, "# Lookups = %d\n", s.Lookups)
pprof.go#L623: fmt.Fprintf(w, "# Mallocs = %d\n", s.Mallocs)
pprof.go#L624: fmt.Fprintf(w, "# Frees = %d\n", s.Frees)
pprof.go#L626: fmt.Fprintf(w, "# HeapAlloc = %d\n", s.HeapAlloc)
pprof.go#L627: fmt.Fprintf(w, "# HeapSys = %d\n", s.HeapSys)
pprof.go#L628: fmt.Fprintf(w, "# HeapIdle = %d\n", s.HeapIdle)
pprof.go#L629: fmt.Fprintf(w, "# HeapInuse = %d\n", s.HeapInuse)
pprof.go#L630: fmt.Fprintf(w, "# HeapReleased = %d\n", s.HeapReleased)
pprof.go#L631: fmt.Fprintf(w, "# HeapObjects = %d\n", s.HeapObjects)
pprof.go#L633: fmt.Fprintf(w, "# Stack = %d / %d\n", s.StackInuse, s.StackSys)
pprof.go#L634: fmt.Fprintf(w, "# MSpan = %d / %d\n", s.MSpanInuse, s.MSpanSys)
pprof.go#L635: fmt.Fprintf(w, "# MCache = %d / %d\n", s.MCacheInuse, s.MCacheSys)
pprof.go#L636: fmt.Fprintf(w, "# BuckHashSys = %d\n", s.BuckHashSys)
pprof.go#L637: fmt.Fprintf(w, "# GCSys = %d\n", s.GCSys)
pprof.go#L638: fmt.Fprintf(w, "# OtherSys = %d\n", s.OtherSys)
pprof.go#L640: fmt.Fprintf(w, "# NextGC = %d\n", s.NextGC)
pprof.go#L641: fmt.Fprintf(w, "# LastGC = %d\n", s.LastGC)
pprof.go#L642: fmt.Fprintf(w, "# PauseNs = %d\n", s.PauseNs)
pprof.go#L643: fmt.Fprintf(w, "# PauseEnd = %d\n", s.PauseEnd)
pprof.go#L644: fmt.Fprintf(w, "# NumGC = %d\n", s.NumGC)
pprof.go#L645: fmt.Fprintf(w, "# NumForcedGC = %d\n", s.NumForcedGC)
pprof.go#L646: fmt.Fprintf(w, "# GCCPUFraction = %v\n", s.GCCPUFraction)
pprof.go#L647: fmt.Fprintf(w, "# DebugGC = %v\n", s.DebugGC)
pprof.go#L886: fmt.Fprintf(w, "--- %v:\n", name)
pprof.go#L887: fmt.Fprintf(w, "cycles/second=%v\n", runtime_cyclesPerSecond())
pprof.go#L889: fmt.Fprintf(w, "sampling period=%d\n", runtime.SetMutexProfileFraction(-1))
pprof.go#L893: fmt.Fprintf(w, "%v %v @", r.Cycles, r.Count)
pprof.go#L895: fmt.Fprintf(w, " %#x", pc)
pprof_rusage.go#L30: fmt.Fprintf(w, "# MaxRSS = %d\n", uintptr(rusage.Maxrss)*rssToBytes)
testing
benchmark.go#L237: fmt.Fprintf(b.w, "--- FAIL: %s\n%s", b.name, b.output)
benchmark.go#L252: fmt.Fprintf(b.w, "--- %s: %s\n%s", tag, b.name, b.output)
benchmark.go#L265: fmt.Fprintf(b.w, "goos: %s\n", runtime.GOOS)
benchmark.go#L266: fmt.Fprintf(b.w, "goarch: %s\n", runtime.GOARCH)
benchmark.go#L268: fmt.Fprintf(b.w, "pkg: %s\n", b.importPath)
benchmark.go#L271: fmt.Fprintf(b.w, "cpu: %s\n", cpu)
benchmark.go#L426: fmt.Fprintf(buf, "%8d", r.N)
benchmark.go#L439: fmt.Fprintf(buf, "\t%7.2f MB/s", mbs)
benchmark.go#L485: fmt.Fprintf(w, format, x, unit)
benchmark.go#L572: fmt.Fprintf(b.w, "%-*s\t", ctx.maxLen, benchName)
benchmark.go#L594: fmt.Fprintf(b.w, "--- FAIL: %s\n%s", benchName, b.output)
benchmark.go#L599: fmt.Fprintf(b.w, "%-*s\t", ctx.maxLen, benchName)
benchmark.go#L609: fmt.Fprintf(b.w, "--- BENCH: %s\n%s", benchName, b.output)
benchmark.go#L612: fmt.Fprintf(os.Stderr, "testing: %s left GOMAXPROCS set to %d\n", benchName, p)
cover.go#L74: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
cover.go#L86: fmt.Fprintf(f, "mode: %s\n", cover.Mode)
cover.go#L102: _, err := fmt.Fprintf(f, "%s:%d.%d,%d.%d %d %d\n", name,
example.go#L37: fmt.Fprintf(os.Stderr, "testing: invalid regexp for -test.run: %s\n", err)
fuzz.go#L364: fmt.Fprintf(f.w, "%v\n", err)
fuzz.go#L367: fmt.Fprintf(f.w, "Failing input written to %s\n", crashPath)
fuzz.go#L369: fmt.Fprintf(f.w, "To re-run:\ngo test -run=%s/%s\n", f.name, testName)
fuzz.go#L569: fmt.Fprintf(os.Stderr, "testing: will not fuzz, -fuzz matches more than one fuzz test: %v\n", matched)
match.go#L55: fmt.Fprintf(os.Stderr, "testing: invalid regexp for %s\n", err)
run_example.go#L40: fmt.Fprintf(os.Stderr, "testing: copying pipe: %v\n", err)
testing.go#L464: fmt.Fprintf(p.w, format, args...)
testing.go#L476: fmt.Fprintf(p.w, "=== CONT %s\n", testName)
testing.go#L480: fmt.Fprintf(p.w, format, args...)
testing.go#L664: fmt.Fprintf(buf, "%s:%d: ", file, line)
testing.go#L710: fmt.Fprintf(p.w, format, args...)
testing.go#L1385: fmt.Fprintf(root.parent.w, "cleanup panicked with %v", r)
testing.go#L1770: fmt.Fprintf(os.Stderr, "testing: invalid regexp in -test.list (%q): %s\n", *matchList, err)
testing.go#L1862: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
testing.go#L1866: fmt.Fprintf(os.Stderr, "testing: can't start cpu profile: %s\n", err)
testing.go#L1875: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
testing.go#L1879: fmt.Fprintf(os.Stderr, "testing: can't start tracing: %s\n", err)
testing.go#L1892: fmt.Fprintf(os.Stderr, "testing: cannot use -test.coverprofile because test binary was not built with coverage enabled\n")
testing.go#L1909: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
testing.go#L1937: fmt.Fprintf(os.Stderr, "testing: can't write %s: %s\n", *testlog, err)
testing.go#L1941: fmt.Fprintf(os.Stderr, "testing: can't write %s: %s\n", *testlog, err)
testing.go#L1954: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
testing.go#L1959: fmt.Fprintf(os.Stderr, "testing: can't write %s: %s\n", *memProfile, err)
testing.go#L1967: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
testing.go#L1971: fmt.Fprintf(os.Stderr, "testing: can't write %s: %s\n", *blockProfile, err)
testing.go#L1979: fmt.Fprintf(os.Stderr, "testing: %s\n", err)
testing.go#L1983: fmt.Fprintf(os.Stderr, "testing: can't write %s: %s\n", *mutexProfile, err)
testing.go#L2049: fmt.Fprintf(os.Stderr, "testing: invalid value %q for -test.cpu\n", val)
text/template
exec.go#L242: fmt.Fprintf(&b, "%q", name)
funcs.go#L691: fmt.Fprintf(w, "\\u%04X", r)