diff options
author | Santiago M. Mola <santi@mola.io> | 2017-04-27 17:09:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-27 17:09:21 +0200 |
commit | a548013a95c25f830103263c25ca999429b2f9dd (patch) | |
tree | 79a824ccedf4ce516744788f6de1dc768034cb7a /plumbing/transport/client | |
parent | bc6b1c429f5a6f4d78a17cbe0e1a9927416f4f1b (diff) | |
parent | 45bdbcbe6fdab5a8a4ed4f1b16c191f400a0f6b6 (diff) | |
download | go-git-a548013a95c25f830103263c25ca999429b2f9dd.tar.gz |
Merge pull request #365 from smola/git-rel-path
transport: make Endpoint an interface, fixes #362
Diffstat (limited to 'plumbing/transport/client')
-rw-r--r-- | plumbing/transport/client/client.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plumbing/transport/client/client.go b/plumbing/transport/client/client.go index a398a74..76c1469 100644 --- a/plumbing/transport/client/client.go +++ b/plumbing/transport/client/client.go @@ -35,13 +35,13 @@ func InstallProtocol(scheme string, c transport.Transport) { // http://, https://, ssh:// and file://. // See `InstallProtocol` to add or modify protocols. func NewClient(endpoint transport.Endpoint) (transport.Transport, error) { - f, ok := Protocols[endpoint.Scheme] + f, ok := Protocols[endpoint.Protocol()] if !ok { - return nil, fmt.Errorf("unsupported scheme %q", endpoint.Scheme) + 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.Scheme) + return nil, fmt.Errorf("malformed client for scheme %q, client is defined as nil", endpoint.Protocol()) } return f, nil |