Update storage/memory.go

Co-authored-by: Chris C. <twin@twinnation.org>
This commit is contained in:
Chris Heppell 2020-12-31 22:31:51 +00:00 committed by GitHub
parent fb5477f50b
commit 7f647305ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ func NewInMemoryStore() *InMemoryStore {
// GetAll returns all the observed results for all services from the in memory store
func (ims *InMemoryStore) GetAll() map[string]*core.ServiceStatus {
results := make(map[string]*core.ServiceStatus)
results := make(map[string]*core.ServiceStatus, len(ims.serviceStatuses))
ims.serviceResultsMutex.RLock()
for key, svcStatus := range ims.serviceStatuses {
copiedResults := copyResults(svcStatus.Results)