errors.As
standard libraryThe 195th most-called standard-library function by production calls. Called 12,542 times across 632 modules; 5,466 of those run outside tests and generated code.
1% in production calls vs 2026-W48 (5,387 → 5,466)
- prod calls
- 5,466
- non-test, non-generated
- all calls
- 12,542
- total callsites
- modules
- 632
- distinct callers
- in loop
- 10%
- of prod calls
- in tests
- 45%
- 5,698 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.
estimate
Estimated relative cost
Roughly 0.01× the estimated relative cost of fmt.Sprintf . Benchmarked at 58.43 ns/op × 5,466 production calls, normalized so fmt.Sprintf = 1.0.
This is not dollars and not a verdict. Per-op time depends heavily on inputs (argument sizes, contention, patterns), the benchmark ran on a single machine (darwin/arm64 (Apple Silicon), go1.26.0), and static call counts are not runtime frequency. How this is estimated →
who calls this
Notable callers
Production calls into As from notable Go projects. Open one on the map to see what else it hammers.
- Kubernetes 255 5%
- Grafana 86 2%
- Cilium 79 1%
- Docker 50 <1%
- InfluxDB 47 <1%
where it's called
Callsites in the wild
12 representative callsites of 12,542, prioritizing in-loop and non-test usage. We link to source, never display it.
- in loop
- in loop
-
caddyserver/certmagic @v0.25.6
in loop - in loop
- in loop
- in loop
- in loop
-
docker/docker @v28.5.2+incompatible
in loop -
etcd/client/v3 @v3.7.4
leasing/kv.go:291
in loop - in loop
- in loop
-
Azure/azure-sdk-for-go/sdk/azcore @v1.24.0
runtime/policy_retry.go:180
in loop
top callers
The modules that reach for it
The modules that call As most in this snapshot.
- github.com/larksuite/cli1,0779%
- github.com/cilium/cilium8607%
- github.com/weaviate/weaviate6926%
- github.com/openai/openai-go/v35104%
- github.com/aliyun/alibabacloud-oss-go-sdk-v25074%
siblings
More from errors
The other most-called functions in this package. See all →