Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 352 Bytes

README.md

File metadata and controls

18 lines (14 loc) · 352 Bytes

syncx

A generic wrapper around sync.Map. This package is made to avoid having to do typecasts when retrieving values out of the sync.Map

Install

go get github.com/mordfustang21/syncx

Example

type MyStruct struct{}

m := syncx.NewMap[comparable, MyStruct]()

out, found := m.Load("key")
// out is of type MyStruct not any