mirror of
https://github.com/clearlinux/libnetwork.git
synced 2026-09-01 11:25:59 +00:00
Move network types to types package
This is need to decouple types from netutils which has linux dependencies. This way the client code which needs network types can just pull in types package which makes client code platform agnostic. Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
This commit is contained in:
@@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/docker/libnetwork"
|
||||
"github.com/docker/libnetwork/netlabel"
|
||||
"github.com/docker/libnetwork/netutils"
|
||||
"github.com/docker/libnetwork/options"
|
||||
"github.com/docker/libnetwork/types"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -58,7 +58,7 @@ func main() {
|
||||
epInfo, err := ep.DriverInfo()
|
||||
mapData, ok := epInfo[netlabel.PortMap]
|
||||
if ok {
|
||||
portMapping, ok := mapData.([]netutils.PortBinding)
|
||||
portMapping, ok := mapData.([]types.PortBinding)
|
||||
if ok {
|
||||
fmt.Printf("Current port mapping for endpoint %s: %v", ep.Name(), portMapping)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user