go/types.Struct.NumFields
standard libraryThe 3719th most-called standard-library method by production calls. Called 166 times across 23 modules; 160 of those run outside tests and generated code.
- prod calls
- 160
- non-test, non-generated
- all calls
- 166
- 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) 35 22%
- Tailscale 6 4%
- Grafana 2 1%
- Uber Go 2 1%
- Traefik 1 <1%
where it's called
Callsites in the wild
12 representative callsites of 166, prioritizing in-loop and non-test usage. We link to source, never display it.
-
google/gvisor @v0.0.0-20260805052044-b67f1412986c
in loop -
gopherjs/gopherjs @v1.21.0
in loop -
goplus/xgo @v1.7.5
in loop -
x/exp @v0.0.0-20260727155853-b88d891fe743
apidiff/correspondence.go:84
in loop - in loop
-
go/tools @v0.7.0
staticcheck/sa4005/sa4005.go:98
in loop -
x/tools @v0.48.0
go/analysis/passes/composite/composite.go:93
in loop - in loop
-
go/tools @v0.7.0
simple/s1016/s1016.go:112
in loop -
x/exp @v0.0.0-20260727155853-b88d891fe743
apidiff/compatibility.go:229
in loop -
go/tools @v0.7.0
cmd/structlayout/main.go:117
in loop -
x/tools @v0.48.0
internal/refactor/inline/callee.go:693
in loop
top callers
The modules that reach for it
The modules that call Struct.NumFields most in this snapshot.
- golang.org/x/tools3420%
- honnef.co/go/tools2917%
- github.com/gopherjs/gopherjs1811%
- github.com/tinygo-org/tinygo1710%
- github.com/google/gvisor106%
siblings
More from go/types
The other most-called members in this package. See all →