From ffc7f29688fb3bfaeb25f323050f1d5650e7db86 Mon Sep 17 00:00:00 2001 From: marcobaobao Date: Thu, 5 Sep 2024 15:41:12 +0200 Subject: [PATCH] small code refactoring --- server/internal/memory_db.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/internal/memory_db.go b/server/internal/memory_db.go index f7d38a8..905c8ec 100644 --- a/server/internal/memory_db.go +++ b/server/internal/memory_db.go @@ -3,7 +3,6 @@ package internal import ( "encoding/gob" "errors" - "maps" "os" "path/filepath" "sync" @@ -62,7 +61,7 @@ func (m *MemoryDB) Keys() *[]string { m.mu.RLock() defer m.mu.RUnlock() - for id := range maps.Keys(m.table) { + for id := range m.table { running = append(running, id) } @@ -74,7 +73,7 @@ func (m *MemoryDB) All() *[]ProcessResponse { running := []ProcessResponse{} m.mu.RLock() - for k, v := range maps.All(m.table) { + for k, v := range m.table { running = append(running, ProcessResponse{ Id: k, Info: v.Info,