mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 00:54:23 +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()
|
||||
defer im.mu.RUnlock()
|
||||
|
||||
var instances []*Instance
|
||||
instances := make([]*Instance, 0, len(im.instances))
|
||||
for _, instance := range im.instances {
|
||||
instances = append(instances, instance)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user