aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/core/bridge.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/core/bridge.go')
-rw-r--r--bridge/core/bridge.go4
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,