golistic / pxmysql

Go MySQL driver using X Protocol
MIT License
14 stars 0 forks source link

feat(driver!): use mysql driver name by importing sub-package #40

Closed geertjanvdk closed 1 year ago

geertjanvdk commented 1 year ago

We remove the need to set an environment variable to not register the "mysql" driver name. Instead, if you really need that name, you can now import the sub-package github.com/golistic/pxmysql/mysql and then you can do:

    db, err := sql.Open("mysql", "u:p@tcp(127.0.0.1:33060)/")

BREAKING CHANGE: Since we now can explicitly define which driver name to use, we do not need the environment variable any longer. Since "mysql" is not registered by default any longer, users must now use the anonymous import github.com/golistic/pxmysql/mysql instead.

Resolves #39