Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 829 Bytes

README.md

File metadata and controls

31 lines (19 loc) · 829 Bytes

CMap

Build Status GoDoc

Thread-safe Go map implementation suitable for concurrent access from multiple goroutines. Built on basic idea taken from: Go maps in action #concurrency

Example

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.

Testing

All the tests can be executed with GORACE="halt_on_error=1" go test -v -race -cover ./... command.

License

MIT