diff options
author | Michael Muré <batolettre@gmail.com> | 2020-02-15 13:54:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-15 13:54:30 +0100 |
commit | 02548c0e8f96a5c08efe46bd5f71f97fdd211de3 (patch) | |
tree | bb537e52035aa1d60d0405f7177b510e96aff1a6 /bridge/core/bridge.go | |
parent | 362c0c7e2e1ce9a8e2918376a340c76f46569d64 (diff) | |
parent | 87b97ca4b2f39240c698596ac14a6d3532f6363d (diff) | |
download | git-bug-02548c0e8f96a5c08efe46bd5f71f97fdd211de3.tar.gz |
Merge pull request #326 from MichaelMure/bridge-refactor
bridges: more refactor and cleanup
Diffstat (limited to 'bridge/core/bridge.go')
-rw-r--r-- | bridge/core/bridge.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bridge/core/bridge.go b/bridge/core/bridge.go index 62fd70f6..c72ff6b4 100644 --- a/bridge/core/bridge.go +++ b/bridge/core/bridge.go @@ -52,7 +52,7 @@ func Register(impl BridgeImpl) { if bridgeLoginMetaKey == nil { bridgeLoginMetaKey = make(map[string]string) } - bridgeImpl[impl.Target()] = reflect.TypeOf(impl) + bridgeImpl[impl.Target()] = reflect.TypeOf(impl).Elem() bridgeLoginMetaKey[impl.Target()] = impl.LoginMetaKey() } @@ -94,7 +94,7 @@ func NewBridge(repo *cache.RepoCache, target string, name string) (*Bridge, erro return nil, fmt.Errorf("unknown bridge target %v", target) } - impl := reflect.New(implType).Elem().Interface().(BridgeImpl) + impl := reflect.New(implType).Interface().(BridgeImpl) bridge := &Bridge{ Name: name, |