Unrelated but important: The DSN/DNS mix-up happened: pxmysql.ParseDNS must of course be pxmysql.ParseDSN.
Given DSN scott:tiger@tcp(127.0.0.1)/employees?useTLS=true and we parse it using pxmysql.ParseDSN we get the parsed version. The String() method should give us again the same DSN, but the query part is missing.
Unrelated but important: The DSN/DNS mix-up happened:
pxmysql.ParseDNS
must of course bepxmysql.ParseDSN
.Given DSN
scott:tiger@tcp(127.0.0.1)/employees?useTLS=true
and we parse it usingpxmysql.ParseDSN
we get the parsed version. TheString()
method should give us again the same DSN, but the query part is missing.