]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.13] doc/go1.13: document _ between digits for math/big, strconv
authorEmmanuel T Odeke <emmanuel@orijtech.com>
Wed, 21 Aug 2019 05:09:31 +0000 (23:09 -0600)
committerAndrew Bonventre <andybons@golang.org>
Fri, 23 Aug 2019 17:22:08 +0000 (17:22 +0000)
Document that:
* math/big.Float.Parse
* math/big.Int.SetString
* strconv.ParseFloat
* strconv.ParseInt
* strconv.ParseUint
now accept underscores to group digits only if base = 0,
as per the Go 2 language changes.

Updates #32815

Change-Id: Id45bd803a18442436419739297e8aed0d32ca56c
Reviewed-on: https://go-review.googlesource.com/c/go/+/191077
Reviewed-by: Robert Griesemer <gri@golang.org>
(cherry picked from commit e764432605cb26478067890b49f4f16019c9a9b9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/191477
Run-TryBot: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

doc/go1.13.html

index 30ea1a5c301d55d02395cfa7ec5db4885da6680b..6cee0b28e60e27ab47e06b10c379c59c25901dbf 100644 (file)
@@ -723,6 +723,18 @@ godoc
       The new <a href="/pkg/math/big/#Rat.SetUint64"><code>Rat.SetUint64</code></a> method sets the <code>Rat</code> to a <code>uint64</code> value.
     </p>
 
+    <p><!-- CL 166157 -->
+      For <a href="/pkg/math/big/#Float.Parse"><code>Float.Parse</code></a>, if base is 0, underscores
+      may be used between digits for readability.
+      See the <a href="#language">Changes to the language</a> for details.
+    </p>
+
+    <p><!-- CL 166157 -->
+      For <a href="/pkg/math/big/#Int.SetString"><code>Int.SetString</code></a>, if base is 0, underscores
+      may be used between digits for readability.
+      See the <a href="#language">Changes to the language</a> for details.
+    </p>
+
     <p><!-- CL 168237 -->
       <a href="/pkg/math/big/#Rat.SetString"><code>Rat.SetString</code></a> now accepts non-decimal floating point representations.
     </p>
@@ -888,6 +900,18 @@ godoc
 
 </dl><!-- runtime -->
 
+<dl id="strconv"><dt><a href="/pkg/strconv">strconv</a></dt>
+  <dd>
+    <p><!-- CL 160243 -->
+       For <a href="/pkg/math/big/#strconv.ParseFloat"><code>strconv.ParseFloat</code></a>,
+       <a href="/pkg/math/big/#strconv.ParseInt"><code>strconv.ParseInt</code></a>
+       and <a href="/pkg/math/big/#strconv.ParseUint"><code>strconv.ParseUint</code></a>,
+       if base is 0, underscores may be used between digits for readability.
+       See the <a href="#language">Changes to the language</a> for details.
+    </p>
+
+</dl><!-- strconv -->
+
 <dl id="strings"><dt><a href="/pkg/strings">strings</a></dt>
   <dd>
     <p><!-- CL 142003 -->