mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 01:30:25 +08:00
12 lines
149 B
Go
12 lines
149 B
Go
package errorx
|
|
|
|
func Chain(fns ...func() error) error {
|
|
for _, fn := range fns {
|
|
if err := fn(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|