mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
Golint (#255)
This commit is contained in:
@@ -45,6 +45,8 @@ import (
|
||||
"github.com/uptrace/bun/dialect/pgdialect"
|
||||
"github.com/uptrace/bun/dialect/sqlitedialect"
|
||||
"github.com/uptrace/bun/migrate"
|
||||
|
||||
// blank import for the sqlite driver for bun
|
||||
_ "modernc.org/sqlite"
|
||||
)
|
||||
|
||||
|
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/uptrace/bun/dialect"
|
||||
)
|
||||
|
||||
// dbConn wrapps a bun.DB conn to provide SQL-type specific additional functionality
|
||||
// DBConn wrapps a bun.DB conn to provide SQL-type specific additional functionality
|
||||
type DBConn struct {
|
||||
// TODO: move *Config here, no need to be in each struct type
|
||||
|
||||
@@ -37,6 +37,7 @@ func WrapDBConn(dbConn *bun.DB, log *logrus.Logger) *DBConn {
|
||||
}
|
||||
}
|
||||
|
||||
// RunInTx wraps execution of the supplied transaction function.
|
||||
func (conn *DBConn) RunInTx(ctx context.Context, fn func(bun.Tx) error) db.Error {
|
||||
// Acquire a new transaction
|
||||
tx, err := conn.BeginTx(ctx, nil)
|
||||
|
Reference in New Issue
Block a user