1
0
Fork 0
mirror of https://github.com/TwiN/gatus.git synced 2024-12-14 11:58:04 +00:00

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)