We ensure that the API and semantics are compatible with sync.Map
. If you have any questions, please raise them in the issue
go get github.com/RealFax/order-map@latest
package main
import odmap "github.com/RealFax/order-map"
func main() {
m := odmap.New[int, string]()
m.Store(0, "Hello")
m.Store(1, "World")
m.Store(2, "😄😄😄")
m.Range(func(key int, value string) bool {
print(value, " ")
return true
})
}
Welcome to propose more features in the issue
- Concurrency safety (add
--tags=safety_map
enabled)
safety_map
unsupported), Contains are not stable and may be removed or have semantic changes in the future.