A threadsafe bidirectional map written in Go
Find a file
2016-11-09 21:33:22 -05:00
.gitignore Bimap 2016-11-09 20:45:07 -05:00
bimap.go Add delete feature 2016-11-09 21:27:11 -05:00
bimap_test.go Add delete feature 2016-11-09 21:27:11 -05:00
README.md Create README.md 2016-11-09 21:33:22 -05:00

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