Maps which retain the order of insertion and have a consistent key order.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
gen-map.go
map.go
map_test.go

README.md

mapof

A package containing maps which retain the order of the inserted keys.

func ExampleStringToString() {
	m := StringToString()
	m.Add("a", "aa")
	m.Add("b", "bb")
	m.Add("b", "bbb")
	m.Add("c", "c")
	m.Del("c")
	value, ok := m.Get("b")
	fmt.Println(value, ok, m.Keys())
	// Output: bbb true [a b]
}