[NO TESTS NEEDED] API list networks should return [] when used with no networks

Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
This commit is contained in:
zhangguanzhang
2021-06-01 20:44:12 +08:00
parent 7dd463bad1
commit 1daaf34d7b

View File

@ -11,7 +11,7 @@ import (
) )
func (ic *ContainerEngine) NetworkList(ctx context.Context, options entities.NetworkListOptions) ([]*entities.NetworkListReport, error) { 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() config, err := ic.Libpod.GetConfig()
if err != nil { if err != nil {