use goctl template to generate all kinds of templates

This commit is contained in:
kevin
2020-10-19 23:13:18 +08:00
parent 85a815bea0
commit dfe6e88529
35 changed files with 152 additions and 104 deletions

11
core/errorx/callchain.go Normal file
View File

@@ -0,0 +1,11 @@
package errorx
func Chain(fns ...func() error) error {
for _, fn := range fns {
if err := fn(); err != nil {
return err
}
}
return nil
}