From 5eb1c562e7deb4191cb160af91a864fb783c1041 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Tue, 21 Nov 2017 08:43:11 +0100 Subject: *: add pointer to the new transport.Endpoint struct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Máximo Cuadros --- plumbing/transport/client/client.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plumbing/transport/client/client.go') diff --git a/plumbing/transport/client/client.go b/plumbing/transport/client/client.go index 76c1469..90635a5 100644 --- a/plumbing/transport/client/client.go +++ b/plumbing/transport/client/client.go @@ -34,14 +34,14 @@ func InstallProtocol(scheme string, c transport.Transport) { // NewClient returns the appropriate client among of the set of known protocols: // http://, https://, ssh:// and file://. // See `InstallProtocol` to add or modify protocols. -func NewClient(endpoint transport.Endpoint) (transport.Transport, error) { - f, ok := Protocols[endpoint.Protocol()] +func NewClient(endpoint *transport.Endpoint) (transport.Transport, error) { + f, ok := Protocols[endpoint.Protocol] if !ok { - return nil, fmt.Errorf("unsupported scheme %q", endpoint.Protocol()) + return nil, fmt.Errorf("unsupported scheme %q", endpoint.Protocol) } if f == nil { - return nil, fmt.Errorf("malformed client for scheme %q, client is defined as nil", endpoint.Protocol()) + return nil, fmt.Errorf("malformed client for scheme %q, client is defined as nil", endpoint.Protocol) } return f, nil -- cgit