I want to combine what I think is called a grouped global with an embedded lock like this:
var stats struct {
sync.RWMutex
m map[string]statsEntry
}
Unfortunately for the map to be useful, it has to be made, so the code becomes:
var stats = struct {
sync.RWMutex
m map[string]statsEntry
}
{
???,
make(map[string]statsEntry),
}
What to put instead of ???
?