aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/server/loader.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/server/loader.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/server/loader.go')
-rw-r--r--plumbing/transport/server/loader.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/plumbing/transport/server/loader.go b/plumbing/transport/server/loader.go
index 028ead4..3af55e1 100644
--- a/plumbing/transport/server/loader.go
+++ b/plumbing/transport/server/loader.go
@@ -17,7 +17,7 @@ type Loader interface {
// Load loads a storer.Storer given a transport.Endpoint.
// Returns transport.ErrRepositoryNotFound if the repository does not
// exist.
- Load(ep transport.Endpoint) (storer.Storer, error)
+ Load(ep *transport.Endpoint) (storer.Storer, error)
}
type fsLoader struct {
@@ -33,8 +33,8 @@ func NewFilesystemLoader(base billy.Filesystem) Loader {
// Load looks up the endpoint's path in the base file system and returns a
// storer for it. Returns transport.ErrRepositoryNotFound if a repository does
// not exist in the given path.
-func (l *fsLoader) Load(ep transport.Endpoint) (storer.Storer, error) {
- fs, err := l.base.Chroot(ep.Path())
+func (l *fsLoader) Load(ep *transport.Endpoint) (storer.Storer, error) {
+ fs, err := l.base.Chroot(ep.Path)
if err != nil {
return nil, err
}
@@ -53,7 +53,7 @@ type MapLoader map[string]storer.Storer
// Load returns a storer.Storer for given a transport.Endpoint by looking it up
// in the map. Returns transport.ErrRepositoryNotFound if the endpoint does not
// exist.
-func (l MapLoader) Load(ep transport.Endpoint) (storer.Storer, error) {
+func (l MapLoader) Load(ep *transport.Endpoint) (storer.Storer, error) {
s, ok := l[ep.String()]
if !ok {
return nil, transport.ErrRepositoryNotFound