gorm.io/gorm and github.com/jinzhu/gorm

gorm.io/gorm and github.com/jinzhu/gorm

The fantastic ORM library for Golang.

gorm.io/gorm

Join Point
Call to gorm.Open

jinzhu/gorm

Join Point
Call to gorm.Open
Advice
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
}()