polyfloyd / go-errorlint

A source code linter that can be used to find code that will cause problems with Go's error wrapping scheme
MIT License
249 stars 19 forks source link

Don't fail if there is at least one error wrapping (fixes #5) #6

Closed dahu33 closed 4 years ago

dahu33 commented 4 years ago

This is a follow-up on issue #5 that was partially fixed with https://github.com/polyfloyd/go-errorlint/commit/32ea8681d64bf4ccd98f555311a8bc1a09f3a976.

This PR should fix the cases when the error wrapped is not the first one in the list of arguments (e.g. fmt.Errorf("%v, %w", err1, err2)).

Thanks!