Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Daniel Nichter <nil at codenode.com>
Daniël van Eeden <git at myname.nl>
Dave Protasowski <dprotaso at gmail.com>
DisposaBoy <disposaboy at dby.me>
DemoManito <jessetang97 at gmail.com>
Egor Smolyakov <egorsmkv at gmail.com>
Erwan Martin <hello at erwan.io>
Evan Elias <evan at skeema.net>
Expand Down
5 changes: 5 additions & 0 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 7 additions & 0 deletions driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down