diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-06-08 10:55:02 +0200 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-06-11 13:06:06 -0400 |
commit | 2993bdf1efe11823e6448993dad4deb3d9f27c2d (patch) | |
tree | 1f5065d4cc81a23074a3541570efd1c6186a7e19 /pkg/api/handlers/compat/networks.go | |
parent | 8ba0c92e6a8da59417d7e96a6f2002bfe1a74f1f (diff) | |
download | podman-2993bdf1efe11823e6448993dad4deb3d9f27c2d.tar.gz podman-2993bdf1efe11823e6448993dad4deb3d9f27c2d.tar.bz2 podman-2993bdf1efe11823e6448993dad4deb3d9f27c2d.zip |
Fix network prune api docs
The api doc used wrong response examples for both the compat and libpod
network prune endpoints. Change the doc so that it matches the actual
return values. Also fix the endpoints to return an empty array instead
of null when no networks are removed.
[NO TESTS NEEDED]
Fixes: #10564
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/api/handlers/compat/networks.go')
-rw-r--r-- | pkg/api/handlers/compat/networks.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/networks.go b/pkg/api/handlers/compat/networks.go index 77ed548d8..04f8570ff 100644 --- a/pkg/api/handlers/compat/networks.go +++ b/pkg/api/handlers/compat/networks.go @@ -414,7 +414,7 @@ func Prune(w http.ResponseWriter, r *http.Request) { type response struct { NetworksDeleted []string } - var prunedNetworks []string //nolint + prunedNetworks := []string{} for _, pr := range pruneReports { if pr.Error != nil { logrus.Error(pr.Error) |