mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
a0a473125b
After moving libnetwork to this repo, we need to update all the import paths for libnetwork to point to docker/docker/libnetwork instead of docker/libnetwork. This change implements that. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
13 lines
341 B
Go
13 lines
341 B
Go
package daemon
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/docker/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)
|
|
}
|