f6f58f3858
``` 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>
13 lines
334 B
Go
13 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)
|
|
}
|