os.Getenv
standard libraryThe 58th most-called standard-library function by production calls. Called 27,717 times across 862 modules; 18,438 of those run outside tests and generated code.
0% in production calls vs 2026-W48 (18,360 → 18,438)
- prod calls
- 18,438
- non-test, non-generated
- all calls
- 27,717
- total callsites
- modules
- 862
- distinct callers
- in loop
- 2%
- of prod calls
- in tests
- 33%
- 9,212 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 755 4%
- Docker 312 2%
- Tailscale 248 1%
- Vault 246 1%
- HashiCorp 143 <1%
where it's called
Callsites in the wild
12 representative callsites of 27,717, 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.7.2
profiler.go:547
in loop -
cockroachdb/cockroach @v19.2.12+incompatible
in loop -
miekg/dns @v0.6.152
cmd/atomdns/internal/conffile/parse.go:441
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/v22,96511%
- github.com/gastownhall/gastown5892%
- github.com/steveyegge/gastown5892%
- github.com/IBM/networking-go-sdk5742%
- github.com/weaviate/weaviate5732%
siblings
More from os
The other most-called functions in this package. See all →