We currently register the driver 'pxmysql' using an init() function. This is the standard way to do it, and users. However, we want users to be able to do it without registration, and allow users to explicitly register the driver rather than "implicit".
We already have github.com/golistic/pxmysql/mysql to register the "mysql" driver name. But this we would then move to new location where it can be used to register other names:
to register pxmysql, users would do _ "github.com/golistic/pxmysql/register"
to register mysql, users would do _ "github.com/golistic/pxmysql/register/mysql"
The init() function in driver.go will be removed.
This is a breaking change, but since we are still in the v0.9 release, we allow this breaking change.
We also understand that this different than other drivers, but it isn't THAT much different.
We currently register the driver 'pxmysql' using an
init()
function. This is the standard way to do it, and users. However, we want users to be able to do it without registration, and allow users to explicitly register the driver rather than "implicit".We already have
github.com/golistic/pxmysql/mysql
to register the "mysql" driver name. But this we would then move to new location where it can be used to register other names:pxmysql
, users would do_ "github.com/golistic/pxmysql/register"
mysql
, users would do_ "github.com/golistic/pxmysql/register/mysql"
The
init()
function indriver.go
will be removed.This is a breaking change, but since we are still in the
v0.9
release, we allow this breaking change.We also understand that this different than other drivers, but it isn't THAT much different.