[GH-13931] Return error in parseDSN func #13931 (#13947)

Automatic Merge
Этот коммит содержится в:
upwell
2020-03-04 00:42:17 +08:00
коммит произвёл GitHub
родитель 25e8eb9eef
Коммит 058f235050
2 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@@ -139,7 +139,7 @@ func parseDSN(dsn string) (string, string, error) {
// Treat the DSN as the URL that it is.
s := strings.SplitN(dsn, "://", 2)
if len(s) != 2 {
errors.New("failed to parse DSN as URL")
return "", "", errors.New("failed to parse DSN as URL")
}
scheme := s[0]