Skip to content

Commit f88a1fb

Browse files
committed
driver: allow configuration of the driver name
1 parent 0126986 commit f88a1fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

driver/driver.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,13 +389,15 @@ func (r *rows) Next(dest []sqldriver.Value) error {
389389
return nil
390390
}
391391

392+
var driverName = "mysql"
393+
392394
func init() {
393395
options["compress"] = CompressOption
394396
options["collation"] = CollationOption
395397
options["readTimeout"] = ReadTimeoutOption
396398
options["writeTimeout"] = WriteTimeoutOption
397399

398-
sql.Register("mysql", driver{})
400+
sql.Register(driverName, driver{})
399401
}
400402

401403
// SetCustomTLSConfig sets a custom TLSConfig for the address (host:port) of the supplied DSN.

0 commit comments

Comments
 (0)