diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-06-01 17:31:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 17:31:47 +0200 |
commit | 53642ca5e96b174d0444c07f9e2938b88a10cd9e (patch) | |
tree | 214ca28d770157a3f8d9f816d0bed72554378354 | |
parent | 7dd463bad1b53802caf3cc1e1e1cc4a250e1667a (diff) | |
parent | 1daaf34d7b36a830bfe1ab8431ad2392b0dfe079 (diff) | |
download | podman-53642ca5e96b174d0444c07f9e2938b88a10cd9e.tar.gz podman-53642ca5e96b174d0444c07f9e2938b88a10cd9e.tar.bz2 podman-53642ca5e96b174d0444c07f9e2938b88a10cd9e.zip |
Merge pull request #10518 from zhangguanzhang/api-networks-list
[NO TESTS NEEDED] Fixes API list networks returns "null" instead of empty array when used with no networks
-rw-r--r-- | pkg/domain/infra/abi/network.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/network.go b/pkg/domain/infra/abi/network.go index 33ab280e5..7900caaa6 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 { |