Update storage/memory.go

Co-authored-by: Chris C. <twin@twinnation.org>
This commit is contained in:
Chris Heppell 2020-12-31 21:56:06 +00:00 committed by Chris Heppell
parent 0af8837710
commit fc4858b1a8

View File

@ -43,11 +43,8 @@ func (ims *InMemoryStore) GetAll() map[string]*core.ServiceStatus {
func (ims *InMemoryStore) GetServiceStatus(group, name string) *core.ServiceStatus { func (ims *InMemoryStore) GetServiceStatus(group, name string) *core.ServiceStatus {
key := fmt.Sprintf("%s_%s", group, name) key := fmt.Sprintf("%s_%s", group, name)
ims.serviceResultsMutex.RLock() ims.serviceResultsMutex.RLock()
serviceStatus, exists := ims.serviceStatuses[key] serviceStatus := ims.serviceStatuses[key]
ims.serviceResultsMutex.RUnlock() ims.serviceResultsMutex.RUnlock()
if !exists {
return nil
}
return serviceStatus return serviceStatus
} }