aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/internal/common/common.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-11-21 11:27:37 +0100
committerGitHub <noreply@github.com>2017-11-21 11:27:37 +0100
commit97fb5e93083fbe4ea02078312ae2cbca3b145ab1 (patch)
tree4ce4c4b5616edb713ea2bc0ebbf485376933cc91 /plumbing/transport/internal/common/common.go
parentdd81bc9156afb8102dd4c082a81bdb285d2e0a4b (diff)
parent5eb1c562e7deb4191cb160af91a864fb783c1041 (diff)
downloadgo-git-97fb5e93083fbe4ea02078312ae2cbca3b145ab1.tar.gz
Merge pull request #650 from mcuadros/endpoint
transport: converts Endpoint interface into a struct
Diffstat (limited to 'plumbing/transport/internal/common/common.go')
-rw-r--r--plumbing/transport/internal/common/common.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/plumbing/transport/internal/common/common.go b/plumbing/transport/internal/common/common.go
index 598c6b1..8ec1ea5 100644
--- a/plumbing/transport/internal/common/common.go
+++ b/plumbing/transport/internal/common/common.go
@@ -39,7 +39,7 @@ type Commander interface {
// error should be returned if the endpoint is not supported or the
// command cannot be created (e.g. binary does not exist, connection
// cannot be established).
- Command(cmd string, ep transport.Endpoint, auth transport.AuthMethod) (Command, error)
+ Command(cmd string, ep *transport.Endpoint, auth transport.AuthMethod) (Command, error)
}
// Command is used for a single command execution.
@@ -83,14 +83,14 @@ func NewClient(runner Commander) transport.Transport {
}
// NewUploadPackSession creates a new UploadPackSession.
-func (c *client) NewUploadPackSession(ep transport.Endpoint, auth transport.AuthMethod) (
+func (c *client) NewUploadPackSession(ep *transport.Endpoint, auth transport.AuthMethod) (
transport.UploadPackSession, error) {
return c.newSession(transport.UploadPackServiceName, ep, auth)
}
// NewReceivePackSession creates a new ReceivePackSession.
-func (c *client) NewReceivePackSession(ep transport.Endpoint, auth transport.AuthMethod) (
+func (c *client) NewReceivePackSession(ep *transport.Endpoint, auth transport.AuthMethod) (
transport.ReceivePackSession, error) {
return c.newSession(transport.ReceivePackServiceName, ep, auth)
@@ -108,7 +108,7 @@ type session struct {
firstErrLine chan string
}
-func (c *client) newSession(s string, ep transport.Endpoint, auth transport.AuthMethod) (*session, error) {
+func (c *client) newSession(s string, ep *transport.Endpoint, auth transport.AuthMethod) (*session, error) {
cmd, err := c.cmdr.Command(s, ep, auth)
if err != nil {
return nil, err