diff options
Diffstat (limited to 'plumbing/transport/client')
-rw-r--r-- | plumbing/transport/client/client.go | 8 | ||||
-rw-r--r-- | plumbing/transport/client/client_test.go | 4 |
2 files changed, 6 insertions, 6 deletions
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 diff --git a/plumbing/transport/client/client_test.go b/plumbing/transport/client/client_test.go index 2b686b6..65cf574 100644 --- a/plumbing/transport/client/client_test.go +++ b/plumbing/transport/client/client_test.go @@ -59,12 +59,12 @@ type dummyClient struct { *http.Client } -func (*dummyClient) NewUploadPackSession(transport.Endpoint, transport.AuthMethod) ( +func (*dummyClient) NewUploadPackSession(*transport.Endpoint, transport.AuthMethod) ( transport.UploadPackSession, error) { return nil, nil } -func (*dummyClient) NewReceivePackSession(transport.Endpoint, transport.AuthMethod) ( +func (*dummyClient) NewReceivePackSession(*transport.Endpoint, transport.AuthMethod) ( transport.ReceivePackSession, error) { return nil, nil } |