FIXED:
* multierr race condition fix/now fully supports multithreading
This commit is contained in:
brent saner committed 2025-01-04 02:29:49 -05:00
1 parent 3c543a05e7
commit fd720f2b34
2 files changed
+11

No files matched your search

+5
View File
@@ -1,9 +1,14 @@
package multierr
import (
`sync`
)
// 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"`
lock sync.Mutex
}