mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-10-31 16:00:05 -04: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
|
|
}
|