mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 09:04:27 +00:00
Return empty array instead of null when no instances
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user