mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-12-26 23:42:29 -05:00
15 lines
254 B
Go
15 lines
254 B
Go
package handlers
|
|
|
|
import (
|
|
"github.com/aclindsa/gorp"
|
|
"github.com/aclindsa/moneygo/internal/store/db"
|
|
)
|
|
|
|
func GetTx(gdb *gorp.DbMap) (*db.Tx, error) {
|
|
tx, err := gdb.Begin()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &db.Tx{gdb.Dialect, tx}, nil
|
|
}
|