]> Cypherpunks.ru repositories - gostls13.git/commitdiff
doc/go1.21: reformat flag init change note
authorIan Lance Taylor <iant@golang.org>
Thu, 1 Jun 2023 16:00:46 +0000 (09:00 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 1 Jun 2023 16:14:15 +0000 (16:14 +0000)
It reads better as a single paragraph. Also added links.

Change-Id: Id6ba54111b63fbd536423272f674e0eb64b087a7
Reviewed-on: https://go-review.googlesource.com/c/go/+/499956
TryBot-Bypass: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
doc/go1.21.html

index 14ce575df18a2ec35c05874fcd0b63286c7c567d..6961581776e671be80c1c1d6462fdb736ad1c0d0 100644 (file)
@@ -568,9 +568,19 @@ Do not send CLs removing the interior tags from such phrases.
     </p>
 
     <p><!-- CL 480215 -->
-      A flag definition (via <code>Bool</code>, <code>BoolVar</code>, <code>Int</code>, <code>IntVar</code>, etc.) will panic if <code>Set</code> has already been called on a flag with the same name.
-      <p>
-      This change is intended to detect cases where <a href="#language">changes in initialization order</a> cause flag operations to occur in a different order than expected. In many cases the fix to this problem is to introduce a explicit package dependence to correctly order the definition before any <code>Set</code> operations.
+      A flag definition
+      (via <a href="/pkg/flag/#Bool"><code>Bool</code></a>,
+      <a href="/pkg/flag/#BoolVar"><code>BoolVar</code></a>,
+      <a href="/pkg/flag/#Int"><code>Int</code></a>,
+      <a href="/pkg/flag/#IntVar"><code>IntVar</code></a>, etc.)
+      will panic if <a href="/pkg/flag/#Set"><code>Set</code></a> has
+      already been called on a flag with the same name. This change is
+      intended to detect cases where <a href="#language">changes in
+      initialization order</a> cause flag operations to occur in a
+      different order than expected. In many cases the fix to this
+      problem is to introduce a explicit package dependence to
+      correctly order the definition before any
+      <a href="/pkg/flag/#Set"><code>Set</code></a> operations.
     </p>
   </dd>
 </dl><!-- flag -->