Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

8 Commits

Repository files navigation

syncmap

GoDocBuild Status

A thread safe map implementation for Golang

Usage

Install with:

go get github.com/DeanThompson/syncmap

Example:

import (
"fmt""github.com/DeanThompson/syncmap"
)
funcmain() {
m:=syncmap.New()
m.Set("one", 1)
v, ok:=m.Get("one")
fmt.Println(v, ok) // 1, truev, ok=m.Get("not_exist")
fmt.Println(v, ok) // nil, falsem.Set("two", 2)
m.Set("three", "three")
foritem:=rangem.IterItems() {
fmt.Println("key:", item.Key, "value:", item.Value)
}
}

About

A thread safe map implementation for Golang

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages