mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
daemon.getEndpointInNetwork() is only used on Windows
``` 13:06:14 daemon/network.go:964:6: U1000: func `getEndpointInNetwork` is unused (unused) 13:06:14 func getEndpointInNetwork(name string, n libnetwork.Network) (libnetwork.Endpoint, error) { ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
e334eeeed8
commit
f6f58f3858
2 changed files with 13 additions and 6 deletions
|
@ -960,12 +960,6 @@ func buildCreateEndpointOptions(c *container.Container, n libnetwork.Network, ep
|
|||
return createOptions, nil
|
||||
}
|
||||
|
||||
// getEndpointInNetwork returns the container's endpoint to the provided network.
|
||||
func getEndpointInNetwork(name string, n libnetwork.Network) (libnetwork.Endpoint, error) {
|
||||
endpointName := strings.TrimPrefix(name, "/")
|
||||
return n.EndpointByName(endpointName)
|
||||
}
|
||||
|
||||
// getSandboxPortMapInfo retrieves the current port-mapping programmed for the given sandbox
|
||||
func getSandboxPortMapInfo(sb libnetwork.Sandbox) nat.PortMap {
|
||||
pm := nat.PortMap{}
|
||||
|
|
13
daemon/network_windows.go
Normal file
13
daemon/network_windows.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
package daemon
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/docker/libnetwork"
|
||||
)
|
||||
|
||||
// getEndpointInNetwork returns the container's endpoint to the provided network.
|
||||
func getEndpointInNetwork(name string, n libnetwork.Network) (libnetwork.Endpoint, error) {
|
||||
endpointName := strings.TrimPrefix(name, "/")
|
||||
return n.EndpointByName(endpointName)
|
||||
}
|
Loading…
Add table
Reference in a new issue