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
This commit is contained in:
OpenShift Merge Robot 2021-06-01 17:31:47 +02:00 committed by GitHub
commit 53642ca5e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {