We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa0924d commit bca3d92Copy full SHA for bca3d92
internal/dsn/dsn.go
@@ -50,6 +50,9 @@ func Parse(dsn string) (info parsedInfo, err error) {
50
if err != nil {
51
return info, xerrors.WithStackTrace(err)
52
}
53
+ if port := uri.Port(); port == "" {
54
+ return info, xerrors.WithStackTrace(fmt.Errorf("bad connection string '%s': port required", dsn))
55
+ }
56
info.Endpoint = uri.Host
57
info.Database = uri.Path
58
info.Secure = uri.Scheme != insecureSchema
0 commit comments