daemon: Daemon.initNetworkController: remove intermediate var
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
dcc75e1563
commit
f91c3cfda6
1 changed files with 2 additions and 4 deletions
|
@ -324,16 +324,14 @@ func (daemon *Daemon) initNetworkController(daemonCfg *config.Config, activeSand
|
|||
continue // workaround for HNS reporting unsupported networks
|
||||
}
|
||||
var n *libnetwork.Network
|
||||
s := func(current *libnetwork.Network) bool {
|
||||
daemon.netController.WalkNetworks(func(current *libnetwork.Network) bool {
|
||||
hnsid := current.DriverOptions()[winlibnetwork.HNSID]
|
||||
if hnsid == v.Id {
|
||||
n = current
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
daemon.netController.WalkNetworks(s)
|
||||
})
|
||||
|
||||
drvOptions := make(map[string]string)
|
||||
nid := ""
|
||||
|
|
Loading…
Add table
Reference in a new issue