Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 371 Bytes

readme.md

File metadata and controls

26 lines (16 loc) · 371 Bytes

BiMap

A simple bi-directional map implementation in Go

API docs: https://godoc.org/github.com/diogobeda/bimap

Usage

import "githib.com/diogobeda/bimap"

// empty map initialization
bm := NewBiMap()

bm.Set("a", 1)

fmt.Println(bm.Get("a"))
// 1

fmt.Println(bm.GetKey(1))
// "a"


// Initialize with values
bm := NewBiMap(Tuple{"a", 1}, Tuple{"b", 2})