watermill
watermill copied to clipboard
Use errors and fmt package to join and wrap errors
Good day!
First of thank you for maintaining and providing the watermill package!
I opened this PR because I noticed that the hashicorp/go-multierror and github.com/pkg/errors where added as an indirect dependency when using watermill.
As these dependency have native alternatives I created this PR.
Since golang 1.20 the go errors package supports errors.Join which replaces the need for the hashicorp/go-multierror package which was providing the same functionality.
To wrap errors fmt.Errorf with the %w format specifier (introduced in golang 1.13) is now used instead of errors.Wrap which was provided by the github.com/pkg/errors package.
Please let me know what you think and if any changes are needed. Have a great day and thank you for reviewing this PR!
Cheers, Warnar
This PR resolves https://github.com/ThreeDotsLabs/watermill/issues/447