Well, this is interesting. A tool for code generating typed sync.Map. You can generate map[T1]T2, ie. map[int]*pkg.YourStruct. It's super fast in runtime, since there's no reflection and you don't need to type-cast anything.
A typed implementation of the Go sync.Map using code generation. - a8m/syncmap
Join in on the conversation with Ali Najafizadeh when you subscribe to Golang Toronto.