Closed dvilaverde closed 3 months ago
I noticed that a DSN like this:
db.example.com:3307/db?ssl=true
would incorrectly have the property db in the connInfo object set to ssl=true when it should have been set to db.
db
connInfo
ssl=true
According to the README the DSN format allows for an optional user:password@.
user:password@
[user[:password]@]addr[/db[?param=X]]
Adding unit tests for the ParseDSN function to cover those cases.
ParseDSN
I noticed that a DSN like this:
would incorrectly have the property
db
in theconnInfo
object set tossl=true
when it should have been set todb
.According to the README the DSN format allows for an optional
user:password@
.Adding unit tests for the
ParseDSN
function to cover those cases.