Htree
Package htree implements the in-memory hash tree. Hacker News: https://news.ycombinator.com/item?id=11369676
Install / Use
/learn @hit9/HtreeREADME
HTree
Package htree implements the in-memory hash tree.
https://pkg.go.dev/github.com/hit9/htree
Example
package main
import (
"fmt"
"github.com/hit9/htree"
)
// Item implements htree.Item.
type Item struct {
key uint32
value string
}
// Key returns the item key.
func (item Item) Key() uint32 {
return item.key
}
func main() {
t := htree.New()
// Add an item.
item := t.Put(Item{123, "data1"})
// Get an item.
item = t.Get(Item{key: 123})
fmt.Println(item)
}
License
BSD.
Related Skills
node-connect
341.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
