Registry / utility / adamzy-cedar-go

adamzy-cedar-go

JSON →
library0.0.0-20170805034717-80a9c64b256dgogounverified

Implements a double-array trie (cedar) for efficient string matching, ported from C++.

go get github.com/adamzy/cedar-go
INSTALL
IMPORT
SIG · ADAMZY-CEDAR-GO
A
adamzy-cedar-go
utilitygov0.0.0-20170805034717-80a9c64b256d
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.

cedar
github.com/adamzy/cedar-go

Creates a trie, inserts a key-value pair, and retrieves the value.

package main import ( "fmt" "github.com/adamzy/cedar-go" ) func main() { trie := cedar.New() trie.Insert([]byte("key"), 1) value, _ := trie.Get([]byte("key")) fmt.Printf("Value: %d\n", value) }
Debug
Known issues
gotchaNot thread-safe for concurrent insertions/deletions.
fix
Use external synchronization (e.g., sync.Mutex) if multiple goroutines modify the trie.
affects: all
Upgrade
Version history
0.0.0-20170805034717-80a9c64b256dlatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
34 hits · last 30 days
node
28
OpenAI (training)
1
Resources
adamzy-cedar-go — go get adamzy-cedar-go · libregistry