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 (
"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,