path/filepath.Clean
standard libraryThe 321st most-called standard-library function by production calls. Called 3,329 times across 358 modules; 2,758 of those run outside tests and generated code.
4% in production calls vs 2026-W37 (2,647 → 2,758)
- prod calls
- 2,758
- non-test, non-generated
- all calls
- 3,329
- total callsites
- modules
- 358
- distinct callers
- in loop
- 19%
- of prod calls
- in tests
- 17%
- 570 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
Roughly 0.01× the estimated relative cost of fmt.Sprintf . Benchmarked at 102.8 ns/op × 2,758 production calls, normalized so fmt.Sprintf = 1.0.
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 (Apple Silicon), go1.26.0), and static call counts are not runtime frequency. How this is estimated →
who calls this
Notable callers
Production calls into Clean from notable Go projects. Open one on the map to see what else it hammers.
- containerd 78 3%
- Kubernetes 52 2%
- Sigstore 50 2%
- Docker 49 2%
- Hugo 39 1%
where it's called
Callsites in the wild
12 representative callsites of 3,329, prioritizing in-loop and non-test usage. We link to source, never display it.
- in loop
-
go/bufplugin @v0.10.0
check/checktest/checktest.go:443
in loop - in loop
- in loop
- in loop
-
docker/docker @v28.5.2+incompatible
in loop -
encr.dev @v1.58.6
pkg/dockerbuild/spec.go:561
in loop - in loop
-
go-gitea/gitea @v1.27.3
in loop -
gitea.dev @v1.27.3
modules/util/path.go:98
in loop - in loop
-
DNSCrypt/dnscrypt-proxy @v0.0.0-20260907210843-47ce24df6e86
in loop
top callers
The modules that reach for it
The modules that call Clean most in this snapshot.
- github.com/esengine/DeepSeek-Reasonix43913%
- github.com/gastownhall/beads1304%
- github.com/steveyegge/beads1304%
- github.com/gruntwork-io/terragrunt1204%
- github.com/runatlantis/atlantis662%
siblings
More from path/filepath
The other most-called functions in this package. See all →