my computer will still die soon

This commit is contained in:
didier.amyot committed 2014-11-01 19:30:24 -07:00
1 parent e80f2601ab
commit 52a13b9cab
7 files changed
+62 -6

No files matched your search

+10
View File
@@ -11,3 +11,13 @@ func JoinAsError(msg []string) error {
}
return nil
}
func JoinErrors(errs []error) error {
msgs := make([]string, 0, len(errs))
for _, err := range errs {
if err != nil {
msgs = append(msgs, err.Error())
}
}
return JoinAsError(msgs)
}