aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-01-09 17:18:19 +0000
committerNeil Alexander <neilalexander@users.noreply.github.com>2020-01-09 17:18:19 +0000
commit9e489845eb64636821c180bbf07ffe5e0bcf1ed6 (patch)
tree1a1517794bf10f1fbd427b21b9eae33f756ec7bb /syncapi/storage
parentee8e167844fd4d18175cba384996bd2e198f41e4 (diff)
Fix #842 - again...
Diffstat (limited to 'syncapi/storage')
-rw-r--r--syncapi/storage/storage.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/syncapi/storage/storage.go b/syncapi/storage/storage.go
index 4d896531..586e630d 100644
--- a/syncapi/storage/storage.go
+++ b/syncapi/storage/storage.go
@@ -16,7 +16,6 @@ package storage
import (
"context"
- "errors"
"net/url"
"time"
@@ -52,14 +51,12 @@ type Database interface {
func NewSyncServerDatasource(dataSourceName string) (Database, error) {
uri, err := url.Parse(dataSourceName)
if err != nil {
- // if the scheme doesn't match, fall back to postgres in case the config has
- // postgres key=value connection strings
return postgres.NewSyncServerDatasource(dataSourceName)
}
switch uri.Scheme {
case "postgres":
return postgres.NewSyncServerDatasource(dataSourceName)
default:
- return nil, errors.New("unknown schema")
+ return postgres.NewSyncServerDatasource(dataSourceName)
}
}