Registry / utility / josharian-intern

josharian-intern

JSON →
library1.0.0gogounverified

Package intern provides best-effort string interning to reduce memory usage.

go get github.com/josharian/intern
INSTALL
IMPORT
SIG · JOSHARIAN-INTERN
J
josharian-intern
utilitygov1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

intern
github.com/josharian/intern

Interns a string to a canonical representation.

import "github.com/josharian/intern" func main() { s := intern.Intern("hello") println(s) }
Debug
Known issues
gotchaInterning is best-effort; interned strings may be removed automatically.
fix
Do not rely on interning for correctness; use only for optimization.
affects: >=1.0.0
Upgrade
Version history
1.0.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
josharian-intern — go get josharian-intern · libregistry