os.File.Close
standard libraryThe 89th most-called standard-library method by production calls. Called 20,760 times across 1,055 modules; 12,672 of those run outside tests and generated code.
1% in production calls vs 2026-W39 (12,586 → 12,672)
- prod calls
- 12,672
- non-test, non-generated
- all calls
- 20,760
- total callsites
- modules
- 1,055
- distinct callers
- in loop
- 8%
- of prod calls
- in tests
- 39%
- 8,069 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 →
- Concrete method100%A method on a value whose type is known exactly.
- Embedded method<1%Reached through an embedded type.
- Method value<1%A method captured as a value, then called.
who calls this
Notable callers
Production calls into File.Close from notable Go projects. Open one on the map to see what else it hammers.
- Kubernetes 455 4%
- containerd 423 3%
- Docker 293 2%
- HashiCorp 155 1%
- Tailscale 153 1%
where it's called
Callsites in the wild
12 representative callsites of 20,760, prioritizing in-loop and non-test usage. We link to source, never display it.
- in loop
- in loop
- in loop
- in loop
-
go/storage @v1.68.0
transfermanager/downloader.go:127
in loop -
cockroachdb/cockroach @v19.2.12+incompatible
in loop -
miekg/dns @v0.6.117
cmd/atomdns/handlers/url/refetch.go:62
in loop - in loop
- in loop
- in loop
-
encr.dev @v1.58.6
pkg/dockerbuild/layer.go:44
in loop - in loop
top callers
The modules that reach for it
The modules that call File.Close most in this snapshot.
- github.com/esengine/DeepSeek-Reasonix4022%
- github.com/seaweedfs/seaweedfs3902%
- github.com/google/gvisor3702%
- github.com/kubernetes/kubernetes3011%
- github.com/u-root/u-root2551%
siblings
More from os
The other most-called members in this package. See all →