mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-25 01:13:40 +01:00
Update storage/memory.go
Co-authored-by: Chris C. <twin@twinnation.org>
This commit is contained in:
parent
0af8837710
commit
fc4858b1a8
@ -43,11 +43,8 @@ func (ims *InMemoryStore) GetAll() map[string]*core.ServiceStatus {
|
||||
func (ims *InMemoryStore) GetServiceStatus(group, name string) *core.ServiceStatus {
|
||||
key := fmt.Sprintf("%s_%s", group, name)
|
||||
ims.serviceResultsMutex.RLock()
|
||||
serviceStatus, exists := ims.serviceStatuses[key]
|
||||
serviceStatus := ims.serviceStatuses[key]
|
||||
ims.serviceResultsMutex.RUnlock()
|
||||
if !exists {
|
||||
return nil
|
||||
}
|
||||
return serviceStatus
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user