These are chat archives for gin-gonic/gin

Sep 2015
arief nur andono
Sep 28 2015 03:05
arief nur andono
Sep 28 2015 03:36
anyody have create dynamic json result from database?
the only way I found is using map, but there is warning in documentation
Maps are not safe for concurrent use: it's not defined what happens when you read and write to them simultaneously. If you need to read from and write to a map from concurrently executing goroutines, the accesses must be mediated by some kind of synchronization mechanism. One common way to protect maps is with sync.RWMutex.
do you really need to use sync.RWMutex?