small code refactoring

This commit is contained in:
2024-09-05 15:41:12 +02:00
parent 2c30bff45d
commit ffc7f29688

View File

@@ -3,7 +3,6 @@ package internal
import ( import (
"encoding/gob" "encoding/gob"
"errors" "errors"
"maps"
"os" "os"
"path/filepath" "path/filepath"
"sync" "sync"
@@ -62,7 +61,7 @@ func (m *MemoryDB) Keys() *[]string {
m.mu.RLock() m.mu.RLock()
defer m.mu.RUnlock() defer m.mu.RUnlock()
for id := range maps.Keys(m.table) { for id := range m.table {
running = append(running, id) running = append(running, id)
} }
@@ -74,7 +73,7 @@ func (m *MemoryDB) All() *[]ProcessResponse {
running := []ProcessResponse{} running := []ProcessResponse{}
m.mu.RLock() m.mu.RLock()
for k, v := range maps.All(m.table) { for k, v := range m.table {
running = append(running, ProcessResponse{ running = append(running, ProcessResponse{
Id: k, Id: k,
Info: v.Info, Info: v.Info,