2
0

ParseURI extracts run-time parameters

refs #99
This commit is contained in:
Jack Christensen
2015-10-16 15:37:49 -05:00
parent 1fb63a4b41
commit 5b0550c1cb
2 changed files with 37 additions and 0 deletions
+14
View File
@@ -364,6 +364,20 @@ func ParseURI(uri string) (ConnConfig, error) {
return cp, err
}
ignoreKeys := map[string]struct{}{
"sslmode": struct{}{},
}
cp.RuntimeParams = make(map[string]string)
for k, v := range url.Query() {
if _, ok := ignoreKeys[k]; ok {
continue
}
cp.RuntimeParams[k] = v[0]
}
return cp, nil
}