go/types.Struct.NumFields
standard libraryThe 3875th most-called standard-library method by production calls. Called 161 times across 23 modules; 155 of those run outside tests and generated code.
2% in production calls vs 2026-W37 (158 → 155)
- prod calls
- 155
- non-test, non-generated
- all calls
- 161
- total callsites
- modules
- 23
- distinct callers
- in loop
- 9%
- of prod calls
- in tests
- 4%
- 6 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.
who calls this
Notable callers
Production calls into Struct.NumFields from notable Go projects. Open one on the map to see what else it hammers.
- Go (golang.org/x) 34 22%
- Tailscale 5 3%
- Grafana 2 1%
- Uber Go 2 1%
- Traefik 1 <1%
where it's called
Callsites in the wild
12 representative callsites of 161, prioritizing in-loop and non-test usage. We link to source, never display it.
-
google/gvisor @v0.0.0-20260919054224-26f3455a4cb9
in loop -
gopherjs/gopherjs @v1.21.0
in loop -
goplus/xgo @v1.7.5
in loop -
x/exp @v0.0.0-20260908205506-85c1c2202aba
apidiff/correspondence.go:84
in loop - in loop
-
go/tools @v0.8.1
simple/s1016/s1016.go:112
in loop -
x/tools @v0.50.0
go/analysis/passes/composite/composite.go:93
in loop - in loop
-
go/tools @v0.8.1
cmd/structlayout/main.go:117
in loop -
x/exp @v0.0.0-20260908205506-85c1c2202aba
apidiff/compatibility.go:229
in loop -
go/tools @v0.8.1
go/ir/builder.go:1336
in loop -
x/tools @v0.50.0
internal/refactor/inline/callee.go:695
in loop
top callers
The modules that reach for it
The modules that call Struct.NumFields most in this snapshot.
- golang.org/x/tools3320%
- honnef.co/go/tools3119%
- github.com/gopherjs/gopherjs1811%
- github.com/tinygo-org/tinygo1610%
- github.com/google/gvisor106%
siblings
More from go/types
The other most-called members in this package. See all →