diff --git a/AUTHORS b/AUTHORS index 4021b96cc..47446d977 100644 --- a/AUTHORS +++ b/AUTHORS @@ -34,6 +34,7 @@ Daniel Nichter Daniƫl van Eeden Dave Protasowski DisposaBoy +DemoManito Egor Smolyakov Erwan Martin Evan Elias diff --git a/driver.go b/driver.go index 105316b81..39dc8651a 100644 --- a/driver.go +++ b/driver.go @@ -97,6 +97,11 @@ func init() { } } +// DriverName return driver name +func DriverName() string { + return driverName +} + // NewConnector returns new driver.Connector. func NewConnector(cfg *Config) (driver.Connector, error) { cfg = cfg.Clone() diff --git a/driver_test.go b/driver_test.go index 4fd196d4b..19cb63708 100644 --- a/driver_test.go +++ b/driver_test.go @@ -3353,6 +3353,13 @@ func configForTests(t *testing.T) *Config { return mycnf } +func TestDriverName(t *testing.T) { + dn := DriverName() + if dn != driverName { + t.Errorf("driver name is incorrect, got: %s", dn) + } +} + func TestNewConnector(t *testing.T) { mycnf := configForTests(t) conn, err := NewConnector(mycnf)