From 1daaf34d7b36a830bfe1ab8431ad2392b0dfe079 Mon Sep 17 00:00:00 2001 From: zhangguanzhang Date: Tue, 1 Jun 2021 20:44:12 +0800 Subject: [PATCH] [NO TESTS NEEDED] API list networks should return [] when used with no networks Signed-off-by: zhangguanzhang --- pkg/domain/infra/abi/network.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/domain/infra/abi/network.go b/pkg/domain/infra/abi/network.go index 33ab280e5d..7900caaa65 100644 --- a/pkg/domain/infra/abi/network.go +++ b/pkg/domain/infra/abi/network.go @@ -11,7 +11,7 @@ import ( ) func (ic *ContainerEngine) NetworkList(ctx context.Context, options entities.NetworkListOptions) ([]*entities.NetworkListReport, error) { - var reports []*entities.NetworkListReport + reports := make([]*entities.NetworkListReport, 0) config, err := ic.Libpod.GetConfig() if err != nil {