moby/daemon/network_windows.go
Sebastiaan van Stijn 64c6f72988
libnetwork: remove Network interface
There's only one implementation; drop the interface and use the
concrete type instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-22 11:56:41 +02:00

13 lines
343 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)
}