We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af8d793 commit b8f5ca0Copy full SHA for b8f5ca0
driver.go
@@ -97,6 +97,11 @@ func init() {
97
}
98
99
100
+// DriverName return driver name
101
+func DriverName() string {
102
+ return driverName
103
+}
104
+
105
// NewConnector returns new driver.Connector.
106
func NewConnector(cfg *Config) (driver.Connector, error) {
107
cfg = cfg.Clone()
driver_test.go
@@ -3353,6 +3353,13 @@ func configForTests(t *testing.T) *Config {
3353
return mycnf
3354
3355
3356
+func TestName(t *testing.T) {
3357
+ dn := DriverName()
3358
+ if dn != driverName {
3359
+ t.Errorf("driver name is incorrect, got: %s", dn)
3360
+ }
3361
3362
3363
func TestNewConnector(t *testing.T) {
3364
mycnf := configForTests(t)
3365
conn, err := NewConnector(mycnf)
0 commit comments