Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 516 Bytes

multipleErrors.md

File metadata and controls

14 lines (9 loc) · 516 Bytes

multipleErrors

multipleErrors reports suspicious error concatenation.

errors.Join, multierror.Append and multierr.Append are supported.

Example:

errs = errors.Join(err) // ⚠️ Call with single error doesn't make sense

errs = errors.Join(e, err) // ⚠️ Original one goes away. Typically, it should be like following
errs = errors.Join(errs, err)