在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:orcaman/concurrent-map开源软件地址:https://github.com/orcaman/concurrent-map开源编程语言:Go 100.0%开源软件介绍:concurrent mapAs explained here and here, the Prior to Go 1.9, there was no concurrent map implementation in the stdlib. In Go 1.9, usageImport the package: import (
"github.com/orcaman/concurrent-map"
) go get "github.com/orcaman/concurrent-map" The package is now imported under the "cmap" namespace. example // Create a new map.
m := cmap.New[string]()
// Sets item within map, sets "bar" under key "foo"
m.Set("foo", "bar")
// Retrieve item from map.
bar, ok := m.Get("foo")
// Removes item under key "foo"
m.Remove("foo") For more examples have a look at concurrent_map_test.go. Running tests: go test "github.com/orcaman/concurrent-map" guidelines for contributingContributions are highly welcome. In order for a contribution to be merged, please follow these guidelines:
languagelicenseMIT (see LICENSE file) |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论