fmt.Sprintf
standard libraryThe 2nd most-called standard-library function by production calls. Called 9,820 times across 194 modules; 7,511 of those run outside tests and generated code.
2% in production calls vs 2026-06-sample (7,688 → 7,511)
- prod calls
- 7,511
- non-test, non-generated
- all calls
- 9,820
- total callsites
- modules
- 194
- distinct callers
- in loop
- 11%
- of prod calls
- in tests
- 21%
- 2,048 calls
- resolved
- 100%
- to a known target
resolution mix
How each call resolves
How each call was attributed. Only resolved kinds, where the target function is known, count toward the ranking. Interface dispatch and unresolved receivers are reported separately and never guessed. Read the taxonomy →
- Package function100%A direct call to an exported package function, resolved by type.
estimate
Estimated relative cost
This function is the reference point: 1.0×. Every other function’s estimated cost is expressed relative to it.
This is not dollars and not a verdict. Per-op time depends heavily on inputs (argument sizes, contention, patterns), the benchmark ran on a single machine (darwin/arm64, go1.22.5), and static call counts are not runtime frequency. How this is estimated →
who calls this
Notable callers
Production calls into Sprintf from notable Go projects. Open one on the map to see what else it hammers.
- Kubernetes 2,253 30%
- HashiCorp 1,953 26%
- Docker 1,652 22%
- Prometheus 1,502 20%
- Go (golang.org/x) 1,352 18%
where it's called
Callsites in the wild
6 representative callsites of 9,820, prioritizing in-loop and non-test usage. We link to source, never display it.
- in loop
-
gopkg.in/yaml.v3 @v1.0.0
internal/parse/reader.go:373
in loop -
gorilla/mux @v1.8.1
in loop -
stretchr/testify @v1.9.0
-
hashicorp/consul @v1.18.1
- test
top callers
The modules that reach for it
The modules that call Sprintf most in this snapshot.
- github.com/gorilla/mux2,94730%
- github.com/hashicorp/consul2,14222%
- github.com/stretchr/testify1,76118%
siblings
More from fmt
The other most-called functions in this package. See all →