From b8f5ca08b61be605ec41293aa69fddff366c86ad Mon Sep 17 00:00:00 2001 From: demoManito <1430482733@qq.com> Date: Wed, 22 May 2024 17:03:04 +0800 Subject: [PATCH 1/4] Add function to get the driver name --- driver.go | 5 +++++ driver_test.go | 7 +++++++ 2 files changed, 12 insertions(+) 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..8d67ded39 100644 --- a/driver_test.go +++ b/driver_test.go @@ -3353,6 +3353,13 @@ func configForTests(t *testing.T) *Config { return mycnf } +func TestName(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) From 96db8c1a055fabfdb0f7e5330f05037a30347dc5 Mon Sep 17 00:00:00 2001 From: demoManito <1430482733@qq.com> Date: Wed, 22 May 2024 17:04:51 +0800 Subject: [PATCH 2/4] fix test func name --- driver_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver_test.go b/driver_test.go index 8d67ded39..19cb63708 100644 --- a/driver_test.go +++ b/driver_test.go @@ -3353,7 +3353,7 @@ func configForTests(t *testing.T) *Config { return mycnf } -func TestName(t *testing.T) { +func TestDriverName(t *testing.T) { dn := DriverName() if dn != driverName { t.Errorf("driver name is incorrect, got: %s", dn) From 7ca57bd33de6cd56d3914f264f03ca1b9bea5843 Mon Sep 17 00:00:00 2001 From: demoManito <1430482733@qq.com> Date: Wed, 22 May 2024 17:18:14 +0800 Subject: [PATCH 3/4] add AUTHORS --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 4021b96cc..b922da910 100644 --- a/AUTHORS +++ b/AUTHORS @@ -65,6 +65,7 @@ Julien Lefevre Julien Schmidt Justin Li Justin Nuß +DemoManito Kamil Dziedzic Kei Kamikawa Kevin Malachowski From 08013ac3e9b8cceac32a32e81a0bf6c23594defa Mon Sep 17 00:00:00 2001 From: demoManito <1430482733@qq.com> Date: Wed, 22 May 2024 17:18:46 +0800 Subject: [PATCH 4/4] add AUTHORS --- AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index b922da910..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 @@ -65,7 +66,6 @@ Julien Lefevre Julien Schmidt Justin Li Justin Nuß -DemoManito Kamil Dziedzic Kei Kamikawa Kevin Malachowski