diff options
author | Antonio Jesus Navarro Perez <antnavper@gmail.com> | 2017-05-16 16:08:20 +0200 |
---|---|---|
committer | Antonio Jesus Navarro Perez <antnavper@gmail.com> | 2017-05-16 16:08:20 +0200 |
commit | 7e798fc34d703770e3391de8ecd65edea0d40181 (patch) | |
tree | f51f804ba5526e8990d0c1ce186e239667930600 /plumbing/transport/server/loader.go | |
parent | 681f24d65046397228b4e4bb4e248fdb1e27f347 (diff) | |
download | go-git-7e798fc34d703770e3391de8ecd65edea0d40181.tar.gz |
transport/server: use Endpoint string representation as a map key.
Two endpoints are not equals between them, even if they were generated using the same url or path.
Diffstat (limited to 'plumbing/transport/server/loader.go')
-rw-r--r-- | plumbing/transport/server/loader.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plumbing/transport/server/loader.go b/plumbing/transport/server/loader.go index b51a795..386c2f0 100644 --- a/plumbing/transport/server/loader.go +++ b/plumbing/transport/server/loader.go @@ -44,13 +44,13 @@ func (l *fsLoader) Load(ep transport.Endpoint) (storer.Storer, error) { // MapLoader is a Loader that uses a lookup map of storer.Storer by // transport.Endpoint. -type MapLoader map[transport.Endpoint]storer.Storer +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) { - s, ok := l[ep] + s, ok := l[ep.String()] if !ok { return nil, transport.ErrRepositoryNotFound } |