1
0
mirror of https://github.com/golang/go synced 2024-11-26 16:46:58 -07:00

doc/go1.14: mention new method strconv.NumError.Unwrap

Updates #30322
Updates #36878

Change-Id: I8b33eb6a8fb7c0ecf365940a1c3ae88dc807ebcd
Reviewed-on: https://go-review.googlesource.com/c/go/+/217132
Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
Ian Lance Taylor 2020-01-30 19:22:15 -08:00
parent f2a4ab32b1
commit 6c0545ab83

View File

@ -694,6 +694,23 @@ TODO
</dl><!-- signal -->
<dl id="strconv"><dt><a href="/pkg/strconv/">strconv</a></dt>
<dd>
<p>
The <a href="/pkg/strconv/#NumError"><code>NumError</code></a>
type now has
an <a href="/pkg/strconv/#NumError.Unwrap"><code>Unwrap</code></a>
method that may be used to retrieve the reason that a conversion
failed.
This supports using <code>NumError</code> values
with <a href="/pkg/errors/#Is"><code>errors.Is</code></a> to see
if the underlying error
is <a href="/pkg/strconv/#pkg-variables"><code>strconv.ErrRange</code></a>
or <a href="/pkg/strconv/#pkg-variables"><code>strconv.ErrSyntax</code></a>.
</p>
</dd>
</dl><!-- strconv -->
<dl id="sync"><dt><a href="/pkg/sync/">sync</a></dt>
<dd>
<p><!-- CL 200577 -->