Fixed variable name
This commit is contained in:
parent
f8938253ce
commit
0e9bb664cd
2
main.go
2
main.go
@ -523,7 +523,7 @@ func (s *DB) Rollback() *DB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// WrapInTx wraps a method in a transaction
|
// WrapInTx wraps a method in a transaction
|
||||||
func (s *DB) WrapInTx(f func(tx *gorm.DB) (error)) error {
|
func (s *DB) WrapInTx(f func(tx *DB) (error)) error {
|
||||||
tx := s.Begin()
|
tx := s.Begin()
|
||||||
if err := f(tx); err != nil {
|
if err := f(tx); err != nil {
|
||||||
tx.Rollback()
|
tx.Rollback()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user