hashicorp / go-multierror

A Go (golang) package for representing a list of errors as a single error.
Mozilla Public License 2.0
2.26k stars 123 forks source link

Is the standard multierror.Error type thread-safe? #93

Open assembly-winston opened 5 months ago

assembly-winston commented 5 months ago

If I have a bunch of goroutines adding to the same multierror.Error type, would this cause problems if I don't wrap it with a mutex?

weiwongfaye commented 3 months ago

the behaviour will be the same like you use slice in multiple goroutines, there will be data race and cause unexpected result.