Skip to content

Commit

Permalink
Make changes based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
mackjmr committed Mar 25, 2022
1 parent e40c7ce commit 1372eb1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions contrib/gorm.io/gorm.v1/example_test.go
Expand Up @@ -31,13 +31,11 @@ func ExampleOpen() {
if err != nil {
log.Fatal(err)
}

db, err := gormtrace.Open(postgres.New(postgres.Config{Conn: sqlDb}), &gorm.Config{})
if err != nil {
log.Fatal(err)
}

user := User{}
var user User

// All calls through gorm.DB are now traced.
db.Where("name = ?", "jinzhu").First(&user)
Expand All @@ -50,12 +48,10 @@ func Example_context() {
if err != nil {
log.Fatal(err)
}

db, err := gormtrace.Open(postgres.New(postgres.Config{Conn: sqlDb}), &gorm.Config{})
if err != nil {
log.Fatal(err)
}

var user User

// Create a root span, giving name, server and resource.
Expand Down

0 comments on commit 1372eb1

Please sign in to comment.