mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
14 lines
334 B
Go
14 lines
334 B
Go
|
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)
|
||
|
}
|