os.Getenv
standard libraryThe 65th most-called standard-library function by production calls. Called 24,097 times across 857 modules; 15,532 of those run outside tests and generated code.
1% in production calls vs 2026-W37 (15,359 → 15,532)
- prod calls
- 15,532
- non-test, non-generated
- all calls
- 24,097
- total callsites
- modules
- 857
- distinct callers
- in loop
- 3%
- of prod calls
- in tests
- 35%
- 8,494 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.
who calls this
Notable callers
Production calls into Getenv from notable Go projects. Open one on the map to see what else it hammers.
- Kubernetes 825 5%
- Docker 312 2%
- Vault 242 2%
- Tailscale 204 1%
- HashiCorp 143 <1%
where it's called
Callsites in the wild
12 representative callsites of 24,097, prioritizing in-loop and non-test usage. We link to source, never display it.
- in loop
- in loop
- in loop
- in loop
-
go/profiler @v0.6.0
profiler.go:539
in loop -
cockroachdb/cockroach @v19.2.12+incompatible
in loop -
miekg/dns @v0.6.114
cmd/atomdns/internal/conffile/parse.go:432
in loop - in loop
-
go-gitea/gitea @v1.27.3
in loop -
gitea.dev @v1.27.3
cmd/hook.go:453
in loop - in loop
-
GoogleCloudPlatform/terraformer @v0.0.0-20260316201050-1807affdde9e
in loop
top callers
The modules that reach for it
The modules that call Getenv most in this snapshot.
- github.com/DataDog/datadog-api-client-go/v25932%
- github.com/gastownhall/gastown5892%
- github.com/steveyegge/gastown5892%
- github.com/weaviate/weaviate5452%
- github.com/IBM/networking-go-sdk5342%
siblings
More from os
The other most-called functions in this package. See all →