Thread-safe Go map implementation suitable for concurrent access from multiple goroutines. Built on basic idea taken from: Go maps in action #concurrency
import "github.com/neptulon/cmap"
m := cmap.New()
m.Set("foo", "bar")
val := m.Get("foo");
bar := val.(string)
log.Println(bar)
m.Delete("foo")
To see a more comprehensive example and relevant documentation, check the godocs.
All the tests can be executed with GORACE="halt_on_error=1" go test -v -race -cover ./...
command.