#Map
2 articles
07 How To Use Maps
Map Use
When we use JSON we sometimes encounter cases of dynamic JSON data, which means that the attributes formed by JSON are uncertain, can increase or decrease and are not even fixed. So in cases like this, if we unmarshal
using Struct, it will be difficult because in the struct we have to define all the attributes.
Getting to Know Sync Map on Golang
Introduction to sync.Map
This sync.Map
is actually very similar to the regular Generic Golangnya map
, but the difference is that this map
is safe to use during concurrent goroutines.