forEach runs each function in the slice within the supplied transaction.
(tx *gorm.DB, fns ...func(tx *gorm.DB) error)
| 6 | |
| 7 | // forEach runs each function in the slice within the supplied transaction. |
| 8 | func forEach(tx *gorm.DB, fns ...func(tx *gorm.DB) error) error { |
| 9 | for _, fn := range fns { |
| 10 | if err := fn(tx); err != nil { |
| 11 | return err |
| 12 | } |
| 13 | } |
| 14 | return nil |
| 15 | } |
no outgoing calls
no test coverage detected