Skip to content

Commit

Permalink
Remove "go1.10" build tag (#1016)
Browse files Browse the repository at this point in the history
Some IDEs and editors refuse to acknowledge the "go1.10" build tag when
autocompleting & compiling. Removing said tag increases usibility of the
library for those stuck with these editors.
  • Loading branch information
neetle authored and methane committed Dec 12, 2019
1 parent 94084c9 commit b66d043
Show file tree
Hide file tree
Showing 5 changed files with 192 additions and 227 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -63,6 +63,7 @@ Lucas Liu <extrafliu at gmail.com>
Luke Scott <luke at webconnex.com>
Maciej Zimnoch <maciej.zimnoch at codilime.com>
Michael Woolnough <michael.woolnough at gmail.com>
Nathanial Murphy <nathanial.murphy at gmail.com>
Nicola Peduzzi <thenikso at gmail.com>
Olivier Mengué <dolmen at cpan.org>
oscarzhao <oscarzhaosl at gmail.com>
Expand Down
22 changes: 22 additions & 0 deletions driver.go
Expand Up @@ -83,3 +83,25 @@ func (d MySQLDriver) Open(dsn string) (driver.Conn, error) {
func init() {
sql.Register("mysql", &MySQLDriver{})
}

// NewConnector returns new driver.Connector.
func NewConnector(cfg *Config) (driver.Connector, error) {
cfg = cfg.Clone()
// normalize the contents of cfg so calls to NewConnector have the same
// behavior as MySQLDriver.OpenConnector
if err := cfg.normalize(); err != nil {
return nil, err
}
return &connector{cfg: cfg}, nil
}

// OpenConnector implements driver.DriverContext.
func (d MySQLDriver) OpenConnector(dsn string) (driver.Connector, error) {
cfg, err := ParseDSN(dsn)
if err != nil {
return nil, err
}
return &connector{
cfg: cfg,
}, nil
}
37 changes: 0 additions & 37 deletions driver_go110.go

This file was deleted.

190 changes: 0 additions & 190 deletions driver_go110_test.go

This file was deleted.

0 comments on commit b66d043

Please sign in to comment.