finalizing logging and multierror

This commit is contained in:
2022-01-05 05:15:38 -05:00
parent 3975f8b11f
commit 0e01306637
24 changed files with 1057 additions and 60 deletions

9
multierr/types.go Normal file
View File

@@ -0,0 +1,9 @@
package multierr
// MultiError is a type of error.Error that can contain multiple errors.
type MultiError struct {
// Errors is a slice of errors to combine/concatenate when .Error() is called.
Errors []error `json:"errors"`
// ErrorSep is a string to use to separate errors for .Error(). The default is "\n".
ErrorSep string `json:"separator"`
}