A threadsafe bidirectional map written in Go
Find a file
2016-11-10 22:03:47 -05:00
.gitignore Bimap 2016-11-09 20:45:07 -05:00
bimap.go Make bimap generic 2016-11-10 22:00:12 -05:00
bimap_test.go Add test 2016-11-10 22:03:47 -05:00
README.md Update README.md 2016-11-09 21:33:37 -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