hashtable:Golang Hashtables的非常简单,惯用且线程安全的实现

时间:2024-04-17 08:34:59
【文件属性】:

文件名称:hashtable:Golang Hashtables的非常简单,惯用且线程安全的实现

文件大小:8KB

文件格式:ZIP

更新时间:2024-04-17 08:34:59

Go

Go中的哈希表 使用Golang Hashtables的非常简单,惯用和线程安全的实现。 安装 ❯ go get -u github.com/HotPotatoC/hashtable 用法 设定值 ht := hashtable . New () ht . Set ( "user" , "John" ) 获得价值 ht . Get ( "user" ) // John 删除值 ht . Remove ( "user" ) // 1 使用Iter()遍历表 for entry := range ht . Iter () { fmt . Printf ( "key: %s | value: %v \n " , entry . Key , entry . Value ) } 查看更多示例 贡献 拉请求是欢迎的。 对于重大更改,请先打开一个问题以讨论您要更改的内容。 执照 支持


【文件预览】:
hashtable-master
----go.mod(93B)
----LICENSE(1KB)
----go.sum(175B)
----.github()
--------workflows()
----hashtable.go(6KB)
----examples()
--------counter()
--------structs()
--------iterator()
----hashtable_bench_test.go(874B)
----README.md(1KB)
----hashtable_test.go(3KB)

网友评论