Closed romannekhor closed 5 years ago
Hi @umputun,
I just found a small bug in ErrSizedGroup Wait() function.
ErrSizedGroup
Wait()
The code below will always fail:
grp := NewErrSizedGroup(10) // wait for completion if err := grp.Wait(); err != nil { panic(err) }
The fix is very simple: before: func (m *multierror) errorOrNil() *multierror { after: func (m *multierror) errorOrNil() error {
func (m *multierror) errorOrNil() *multierror {
func (m *multierror) errorOrNil() error {
More details: https://dev.to/pauljlucas/go-tcha-when-nil--nil-hic ("nil != nil" in Go)
thx
Hi @umputun,
I just found a small bug in
ErrSizedGroup
Wait()
function.The code below will always fail:
The fix is very simple: before:
func (m *multierror) errorOrNil() *multierror {
after:func (m *multierror) errorOrNil() error {
More details: https://dev.to/pauljlucas/go-tcha-when-nil--nil-hic ("nil != nil" in Go)