path/filepath.Clean
standard libraryThe 345th most-called standard-library function by production calls. Called 2,972 times across 355 modules; 2,480 of those run outside tests and generated code.
- prod calls
- 2,480
- non-test, non-generated
- all calls
- 2,972
- total callsites
- modules
- 355
- distinct callers
- in loop
- 20%
- of prod calls
- in tests
- 17%
- 491 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,480 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 77 3%
- Kubernetes 52 2%
- Docker 49 2%
- Sigstore 49 2%
- Hugo 38 2%
where it's called
Callsites in the wild
12 representative callsites of 2,972, 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.57.13
pkg/dockerbuild/spec.go:561
in loop - in loop
-
go-gitea/gitea @v1.27.1
in loop -
gitea.dev @v1.27.1
modules/util/path.go:98
in loop - in loop
-
DNSCrypt/dnscrypt-proxy @v0.0.0-20260801091651-c3ba78fac8a3
in loop
top callers
The modules that reach for it
The modules that call Clean most in this snapshot.
- github.com/esengine/DeepSeek-Reasonix2699%
- github.com/gruntwork-io/terragrunt1064%
- github.com/gastownhall/beads813%
- github.com/steveyegge/beads813%
- github.com/opentofu/opentofu612%
siblings
More from path/filepath
The other most-called functions in this package. See all →