1package interactors
2
3func ExistingErrorOr(existing error, toEvaluate func() error) error {
4	if existing != nil {
5		return existing
6	}
7	return toEvaluate()
8}
9
10func AnyError(errors ...error) error {
11	for _, err := range errors {
12		if err != nil {
13			return err
14		}
15	}
16	return nil
17}
18