]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.14: mention new method strconv.NumError.Unwrap
authorIan Lance Taylor <iant@golang.org>
Fri, 31 Jan 2020 03:22:15 +0000 (19:22 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 31 Jan 2020 15:05:11 +0000 (15:05 +0000)
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>
doc/go1.14.html

index 7e74c7a69bd4522c5b1b4d5fb0a12c38a7d634b8..26644cca59b6acd499381146e9be4ec76c094cc7 100644 (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 -->