mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
12 lines
254 B
Go
12 lines
254 B
Go
package utils
|
|
|
|
// Do executes each function in the slice in order. If any function returns an error, it is returned immediately.
|
|
func Do(fn []func() error) error {
|
|
for _, f := range fn {
|
|
if err := f(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|