diff options
author | zhangguanzhang <zhangguanzhang@qq.com> | 2020-08-21 10:02:57 +0800 |
---|---|---|
committer | zhangguanzhang <zhangguanzhang@qq.com> | 2020-08-21 17:48:14 +0800 |
commit | fb4977b936a54497434967997f61ae18a1d44373 (patch) | |
tree | 111c5a5122e76d8f91921b69b32e00d02e4c0e96 /pkg | |
parent | 516196f09677819b72d03e068fb8094b28e273aa (diff) | |
download | podman-fb4977b936a54497434967997f61ae18a1d44373.tar.gz podman-fb4977b936a54497434967997f61ae18a1d44373.tar.bz2 podman-fb4977b936a54497434967997f61ae18a1d44373.zip |
fix /libpod/pods/json returns null when there are no pods
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/api/handlers/utils/pods.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/utils/pods.go b/pkg/api/handlers/utils/pods.go index 8276fb55e..54ebe2d29 100644 --- a/pkg/api/handlers/utils/pods.go +++ b/pkg/api/handlers/utils/pods.go @@ -45,7 +45,7 @@ func GetPods(w http.ResponseWriter, r *http.Request) ([]*entities.ListPodsReport } if len(pods) == 0 { - return nil, nil + return []*entities.ListPodsReport{}, nil } lps := make([]*entities.ListPodsReport, 0, len(pods)) |