bytes.TrimSpace
standard libraryThe 745th most-called standard-library function by production calls. Called 1,151 times across 299 modules; 922 of those run outside tests and generated code.
- prod calls
- 922
- non-test, non-generated
- all calls
- 1,151
- total callsites
- modules
- 299
- distinct callers
- in loop
- 29%
- of prod calls
- in tests
- 19%
- 221 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 TrimSpace from notable Go projects. Open one on the map to see what else it hammers.
- Tailscale 34 4%
- Kubernetes 31 3%
- Go (golang.org/x) 26 3%
- Gitea 15 2%
- InfluxDB 15 2%
where it's called
Callsites in the wild
12 representative callsites of 1,151, prioritizing in-loop and non-test usage. We link to source, never display it.
- in loop
- in loop
-
cilium/ebpf @v0.22.0
in loop - in loop
-
cockroachdb/cockroach @v19.2.12+incompatible
in loop -
moby/sys/user @v0.4.1
user.go:127
in loop -
encr.dev @v1.57.13
cli/cmd/encore/app/create.go:577
in loop -
filippo.io/age @v1.3.1
armor/armor.go:124
in loop - in loop
-
gitea.dev @v1.27.1
services/gitdiff/gitdiff.go:1066
in loop -
FiloSottile/age @v1.3.1
in loop - in loop
top callers
The modules that reach for it
The modules that call TrimSpace most in this snapshot.
- tailscale.com464%
- github.com/sagernet/tailscale454%
- github.com/tailscale/tailscale454%
- github.com/esengine/DeepSeek-Reasonix222%
- github.com/sourcegraph/sourcegraph-public-snapshot212%
siblings
More from bytes
The other most-called functions in this package. See all →