aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/client/client.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-11-21 08:43:11 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2017-11-21 08:43:11 +0100
commit5eb1c562e7deb4191cb160af91a864fb783c1041 (patch)
tree090b3fef25c728381f384f9e04a86fa9905549c8 /plumbing/transport/client/client.go
parent90796406c0755f61761fb176cdfe6106f00d903c (diff)
downloadgo-git-5eb1c562e7deb4191cb160af91a864fb783c1041.tar.gz
*: add pointer to the new transport.Endpoint struct
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
Diffstat (limited to 'plumbing/transport/client/client.go')
-rw-r--r--plumbing/transport/client/client.go8
1 files changed, 4 insertions, 4 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