【文件属性】:
文件名称:celltree:一种快速的内存中前缀树,使用uint64作为键,并允许重复的条目
文件大小:11KB
文件格式:ZIP
更新时间:2021-05-24 04:16:00
Go
celltree
一种快速的内存中前缀树,它使用uint64作为键,使用interface {}作为数据,并允许重复的条目。
入门
正在安装
要开始使用celltree,请安装Go并运行go get :
$ go get -u github.com/tidwall/celltree
例子
var tr celltree. Tree
tr . Insert ( 10 , nil )
tr . Insert ( 5 , nil )
tr . Insert ( 31 , nil )
tr . Insert ( 16 , nil )
tr . Insert ( 9 , nil )
tr . Scan ( func ( cell uint64 , data interface {}) bool {
println ( cell )
return true
})
输出:
5
【文件预览】:
celltree-master
----celltree.go(13KB)
----README.md(1KB)
----celltree_test.go(18KB)
----LICENSE(1KB)
----go.mod(122B)
----go.sum(332B)