mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Return an empty network list if nothing matches filter
Initializing the network list struct in order to return an empty list
instead of a nil object.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit a7043ac5c4
)
This commit is contained in:
parent
d83a27471b
commit
ea03b75b20
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ func filterNetworks(nws []types.NetworkResource, filter filters.Args) ([]types.N
|
|||
return nil, err
|
||||
}
|
||||
|
||||
var displayNet []types.NetworkResource
|
||||
displayNet := []types.NetworkResource{}
|
||||
for _, nw := range nws {
|
||||
if filter.Include("driver") {
|
||||
if !filter.ExactMatch("driver", nw.Driver) {
|
||||
|
|
Loading…
Add table
Reference in a new issue