strings.HasSuffix
standard libraryThe 108th most-called standard-library function by production calls. Called 13,492 times across 898 modules; 9,952 of those run outside tests and generated code.
1% in production calls vs 2026-W48 (9,864 → 9,952)
- prod calls
- 9,952
- non-test, non-generated
- all calls
- 13,492
- total callsites
- modules
- 898
- distinct callers
- in loop
- 32%
- of prod calls
- in tests
- 26%
- 3,495 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.00× the estimated relative cost of fmt.Sprintf . Benchmarked at 2.4 ns/op × 9,952 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 HasSuffix from notable Go projects. Open one on the map to see what else it hammers.
- Kubernetes 555 6%
- Istio 186 2%
- Grafana 161 2%
- Vault 149 1%
- Go (golang.org/x) 144 1%
where it's called
Callsites in the wild
12 representative callsites of 13,492, prioritizing in-loop and non-test usage. We link to source, never display it.
- in loop
- in loop
-
go/protovalidate @v1.4.1
internal/rules/rules.go:152
in loop - in loop
-
bubbles/v2 @v2.2.2
filepicker/filepicker.go:526
in loop -
charm.land/catwalk @v0.52.87
cmd/openrouter/main.go:274
in loop - in loop
-
go/logging @v1.21.1
instrumentation.go:78
in loop -
go/profiler @v0.7.2
proftest/proftest.go:203
in loop -
go/storage @v1.71.1
dataflux/sequential.go:75
in loop -
cockroachdb/cockroach @v19.2.12+incompatible
in loop -
miekg/dns @v0.6.152
cmd/atomdns/atom/server.go:433
in loop
top callers
The modules that reach for it
The modules that call HasSuffix most in this snapshot.
- github.com/esengine/DeepSeek-Reasonix3393%
- github.com/infiniflow/ragflow3062%
- github.com/Tencent/WeKnora2792%
- github.com/kubernetes/kubernetes2752%
- github.com/seaweedfs/seaweedfs2712%
siblings
More from strings
The other most-called functions in this package. See all →