Skip to content

survivorbat/go-tsyncmap

Repository files navigation

🗺️️ Generic sync.Map

Go package GitHub GitHub go.mod Go version

A wrap around sync.Map that uses generics.

package main

import "github.com/survivorbat/go-tsyncmap"

func main() {
	myMap := tsyncmap.Map[string, string]{}
	
	myMap.Store("a", "b")
	
	myMap.Load("a") // Returns "b"
}

⬇️ Installation

go get github.com/survivorbat/go-tsyncmap

📋 Usage

package main

import "github.com/survivorbat/go-tsyncmap"

func main() {
	myMap := tsyncmap.Map[string, string]{}

	myMap.Store("a", "b")

	myMap.Load("a") // Returns "b"
}

🔭 Plans

Not much.