From: Ian Lance Taylor Date: Thu, 1 Jun 2023 16:00:46 +0000 (-0700) Subject: doc/go1.21: reformat flag init change note X-Git-Tag: go1.21rc1~137 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=990113f3a0285f3ea2fdb590f61e835bf41ba1dc;p=gostls13.git doc/go1.21: reformat flag init change note 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 Reviewed-by: Keith Randall Reviewed-by: Keith Randall Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor --- diff --git a/doc/go1.21.html b/doc/go1.21.html index 14ce575df1..6961581776 100644 --- a/doc/go1.21.html +++ b/doc/go1.21.html @@ -568,9 +568,19 @@ Do not send CLs removing the interior tags from such phrases.

- A flag definition (via Bool, BoolVar, Int, IntVar, etc.) will panic if Set has already been called on a flag with the same name. -

- This change is intended to detect cases where changes in initialization order 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 Set operations. + A flag definition + (via Bool, + BoolVar, + Int, + IntVar, etc.) + will panic if Set has + already been called on a flag with the same name. This change is + intended to detect cases where changes in + initialization order 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 + Set operations.