Closed fkorotkov closed 4 years ago
Yes, this seems like a valid usecase. Especially considering fmt.Errorf
is able to only wrap one error at a time.
It might also be useful to add a check for multiple %w verbs in a single format string, but let's get this sorted out first.
go vet
does not like multiple %w verbs either, so the suggestion made by this linter is in conflict and therefore a bug
Thank you for a speedy fix! 🎉
In our codebase we do wrap error to a generic internal error with code like this:
The linter reports that the second error is not wrapped but that's fine.