MCPcopy Create free account
hub / github.com/davecheney/pub / forEach

Function forEach

models/models.go:8–15  ·  view source on GitHub ↗

forEach runs each function in the slice within the supplied transaction.

(tx *gorm.DB, fns ...func(tx *gorm.DB) error)

Source from the content-addressed store, hash-verified

6
7// forEach runs each function in the slice within the supplied transaction.
8func 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}

Callers 8

BeforeUpdateMethod · 0.70
AfterUpdateMethod · 0.70
AfterCreateMethod · 0.70
AfterUpdateMethod · 0.70
AfterCreateMethod · 0.70
BeforeUpdateMethod · 0.70
AfterSaveMethod · 0.70
AfterCreateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected