Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

Commit

Permalink
Update README.md (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
newyue588cc authored Jun 9, 2022
1 parent 8e1b06d commit 47241c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gorm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ db, err := gorm.Open(mysql.Open(dsn), &gorm.Config{})
if err != nil {
log.Fatalf("open db error: %v \n", err)
}
db.Use(gormPlugin.New(tracer, "127.0.0.1:3306", gormPlugin.MYSQL))
db.Use(gormPlugin.New(tracer, gormPlugin.WithPeerAddr("127.0.0.1:3306"), gormPlugin.WithSqlDBType(gormPlugin.MYSQL)))

// use with context
dbWithCtx := db.WithContext(ctx)
```
```(

0 comments on commit 47241c9

Please sign in to comment.