Proposal Details
This is a proposal to update several fmt.Errorf calls in crypto/tls and crypto/x509 to use the %w verb instead of %s.
Rationale:
Currently, some error messages in these packages are formatted using %s. By changing them to %w, callers will be able to inspect the underlying errors using errors.Is and errors.As.
Implementation:
I have already uploaded a Gerrit CL for this change: https://go-review.googlesource.com/c/go/+/750300
Since making errors inspectable is effectively adding to the public API, I am opening this proposal to discuss whether this behavior change is desired and what kind of test/documentation updates are needed.
cc @golang/security
Proposal Details
This is a proposal to update several
fmt.Errorfcalls incrypto/tlsandcrypto/x509to use the%wverb instead of%s.Rationale:
Currently, some error messages in these packages are formatted using
%s. By changing them to%w, callers will be able to inspect the underlying errors usingerrors.Isanderrors.As.Implementation:
I have already uploaded a Gerrit CL for this change: https://go-review.googlesource.com/c/go/+/750300
Since making errors inspectable is effectively adding to the public API, I am opening this proposal to discuss whether this behavior change is desired and what kind of test/documentation updates are needed.
cc @golang/security