From 00f05ae012a69284ab28ee1eb089c782cc6a129c Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 22 Jun 2019 14:29:13 +1000 Subject: [PATCH] fixup inspect container struct --- pkg/commands/container.go | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/pkg/commands/container.go b/pkg/commands/container.go index e2d3b5a4e..7c383580a 100644 --- a/pkg/commands/container.go +++ b/pkg/commands/container.go @@ -225,22 +225,20 @@ type Details struct { IPPrefixLen int `json:"IPPrefixLen"` IPv6Gateway string `json:"IPv6Gateway"` MacAddress string `json:"MacAddress"` - Networks struct { - ApdevDefault struct { - IPAMConfig interface{} `json:"IPAMConfig"` - Links interface{} `json:"Links"` - Aliases []string `json:"Aliases"` - NetworkID string `json:"NetworkID"` - EndpointID string `json:"EndpointID"` - Gateway string `json:"Gateway"` - IPAddress string `json:"IPAddress"` - IPPrefixLen int `json:"IPPrefixLen"` - IPv6Gateway string `json:"IPv6Gateway"` - GlobalIPv6Address string `json:"GlobalIPv6Address"` - GlobalIPv6PrefixLen int `json:"GlobalIPv6PrefixLen"` - MacAddress string `json:"MacAddress"` - DriverOpts interface{} `json:"DriverOpts"` - } `json:"apdev_default"` + Networks map[string]struct { + IPAMConfig interface{} `json:"IPAMConfig"` + Links interface{} `json:"Links"` + Aliases []string `json:"Aliases"` + NetworkID string `json:"NetworkID"` + EndpointID string `json:"EndpointID"` + Gateway string `json:"Gateway"` + IPAddress string `json:"IPAddress"` + IPPrefixLen int `json:"IPPrefixLen"` + IPv6Gateway string `json:"IPv6Gateway"` + GlobalIPv6Address string `json:"GlobalIPv6Address"` + GlobalIPv6PrefixLen int `json:"GlobalIPv6PrefixLen"` + MacAddress string `json:"MacAddress"` + DriverOpts interface{} `json:"DriverOpts"` } `json:"Networks"` } `json:"NetworkSettings"` }