Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden committed Dec 6, 2024
1 parent 529a1ab commit 518f06f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,18 @@ func main() {
A custom driver name can be set via build options: `-ldflags '-X "github.com/go-mysql-org/go-mysql/driver.driverName=gomysql"'`.

This can be useful when using [GORM](https://gorm.io/docs/connecting_to_the_database.html#Customize-Driver):

```go
mysql.Config{
DriverName: "gomysql",
...
}
import (
_ "github.com/go-mysql-org/go-mysql/driver"
"gorm.io/driver/mysql"
"gorm.io/gorm"
)

db, err := gorm.Open(mysql.New(mysql.Config{
DriverName: "gomysql",
DSN: "gorm:[email protected]:3306/test",
}))
```

### Custom NamedValueChecker
Expand Down

0 comments on commit 518f06f

Please sign in to comment.