summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorJakub Guzik <jakubmguzik@gmail.com>2021-03-12 00:03:03 +0100
committerJakub Guzik <jakubmguzik@gmail.com>2021-03-12 00:03:03 +0100
commit7b0155cf780f396f6ffc4455ae5825f5fc14ca79 (patch)
tree6969fbedbd7cf3363d7f39cdd84c7cd7179dc0bd /pkg/bindings
parente2d35e55d0ad77fcaca5bbe90276e9c47d514131 (diff)
downloadpodman-7b0155cf780f396f6ffc4455ae5825f5fc14ca79.tar.gz
podman-7b0155cf780f396f6ffc4455ae5825f5fc14ca79.tar.bz2
podman-7b0155cf780f396f6ffc4455ae5825f5fc14ca79.zip
Fix array instead of one elem network http api
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
Diffstat (limited to 'pkg/bindings')
-rw-r--r--pkg/bindings/network/network.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/bindings/network/network.go b/pkg/bindings/network/network.go
index 46a3719fe..6f3aa8594 100644
--- a/pkg/bindings/network/network.go
+++ b/pkg/bindings/network/network.go
@@ -40,6 +40,7 @@ func Create(ctx context.Context, options *CreateOptions) (*entities.NetworkCreat
// Inspect returns low level information about a CNI network configuration
func Inspect(ctx context.Context, nameOrID string, options *InspectOptions) ([]entities.NetworkInspectReport, error) {
var reports []entities.NetworkInspectReport
+ reports = append(reports, entities.NetworkInspectReport{})
if options == nil {
options = new(InspectOptions)
}
@@ -52,7 +53,7 @@ func Inspect(ctx context.Context, nameOrID string, options *InspectOptions) ([]e
if err != nil {
return nil, err
}
- return reports, response.Process(&reports)
+ return reports, response.Process(&reports[0])
}
// Remove deletes a defined CNI network configuration by name. The optional force boolean