Skip to content
callcount

os.Getenv

standard library

The 34th most-called standard-library function by production calls. Called 910 times across 205 modules; 580 of those run outside tests and generated code.

All of os → Docs on pkg.go.dev ↗

prod calls
580
non-test, non-generated
all calls
910
total callsites
modules
205
distinct callers
in loop
24%
of prod calls
in tests
25%
226 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.

top callers

The modules that reach for it

The modules that call Getenv most in this snapshot.

  • github.com/docker/docker34338%
  • github.com/spf13/pflag12213%
  • github.com/stretchr/testify819%