Return empty array instead of null when no instances

This commit is contained in:
2025-07-23 17:21:49 +02:00
parent f8469f1ed4
commit cc7ecc5aee

View File

@@ -39,7 +39,7 @@ func (im *instanceManager) ListInstances() ([]*Instance, error) {
im.mu.RLock() im.mu.RLock()
defer im.mu.RUnlock() defer im.mu.RUnlock()
var instances []*Instance instances := make([]*Instance, 0, len(im.instances))
for _, instance := range im.instances { for _, instance := range im.instances {
instances = append(instances, instance) instances = append(instances, instance)
} }