Skip to content

Commit 529a1ab

Browse files
committed
Update README
1 parent f88a1fb commit 529a1ab

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,19 @@ func main() {
455455
}
456456
```
457457

458+
### Custom Driver Name
459+
460+
A custom driver name can be set via build options: `-ldflags '-X "github.com/go-mysql-org/go-mysql/driver.driverName=gomysql"'`.
461+
462+
This can be useful when using [GORM](https://gorm.io/docs/connecting_to_the_database.html#Customize-Driver):
463+
```go
464+
mysql.Config{
465+
DriverName: "gomysql",
466+
...
467+
}
468+
469+
```
470+
458471
### Custom NamedValueChecker
459472

460473
Golang allows for custom handling of query arguments before they are passed to the driver

0 commit comments

Comments
 (0)