gorm.io/gorm and github.com/jinzhu/gorm
The fantastic ORM library for Golang.
gorm.io/gorm
Call to
gorm.Open
Redirect the call to
gopkg.in/DataDog/dd-trace-go.v1/contrib/gorm.io/gorm.v1.Open
.jinzhu/gorm
Call to
gorm.Open
Replace the expression using the template:
// Using the following synthetic imports:
import (
gorm "github.com/jinzhu/gorm"
gormtrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/jinzhu/gorm"
)
func() (*gorm.DB, error) {
db, err := {{ . }}
if err != nil {
return nil, err
}
return gormtrace.WithCallbacks(db), err
}()