mirror of
https://github.com/donl/bimap.git
synced 2026-05-25 22:06:41 -06:00
A threadsafe bidirectional map written in Go
| .gitignore | ||
| bimap.go | ||
| bimap_test.go | ||
| README.md | ||
bimap
A bidirectional map written in Go
Installation
go get github.com/vishalkuo/bimap
Usage
import "github.com/vishalkuo/bimap"
biMap := biMap.NewBiMap()
biMap.Insert("key", "value")
val, ok := biMap.InverseGet("value") // val should be "key", ok should be true
biMap.Delete("key")
biMap.Size() // == 0