Closed rozanecm closed 2 years ago
G'day. Thanks for the suggestion, however, this has previously been discussed in #18. The use of %v
here is intentional.
I recommend using %v
, until you know you want to inspect an error, and only in that case using %w
. Otherwise, you risk unintentionally exposing errors as part of your public API. This is also presented in the go-errorlint README as a caveat of using %w
.
Use %w in fmt.Errorf instead of %v or %s. Following go-errorlint's suggestions.