Skip to content

projekt-go/go-dashmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-dashmap

Simple generic thread-safe hash map for Go

Installation

go get -u github.com/projekt-go/dashmap

Usage

use it like a normal map, but it's also safe for concurrent usage.

mp := dashmap.New[string, int]()

mp.Put("fish", 2)

val, ok := mp.Get("fish")

fmt.Println(val) // 2

for entry := range mp.Entries() {
  fmt.Printf("key: %s, value: %d\n", entry.Key, entry.Value)
}

Releases

No releases published

Packages

No packages published

Languages