mirror of
https://github.com/docker/compose.git
synced 2025-07-25 14:44:29 +02:00
Return empty list instead of nil on List
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
parent
0f6f547214
commit
ef5e013aa7
@ -53,7 +53,7 @@ func (cs *aciContainerService) List(ctx context.Context, all bool) ([]containers
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
var res []containers.Container
|
res := []containers.Container{}
|
||||||
for _, group := range containerGroups {
|
for _, group := range containerGroups {
|
||||||
if group.Containers == nil || len(*group.Containers) == 0 {
|
if group.Containers == nil || len(*group.Containers) == 0 {
|
||||||
return nil, fmt.Errorf("no containers found in ACI container group %s", *group.Name)
|
return nil, fmt.Errorf("no containers found in ACI container group %s", *group.Name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user