]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.20: document adding to the timeformat vet analysis
authorTim King <taking@google.com>
Tue, 22 Nov 2022 21:52:11 +0000 (13:52 -0800)
committerTim King <taking@google.com>
Wed, 23 Nov 2022 18:23:24 +0000 (18:23 +0000)
Address the release notes TODO regarding the timeformat analyzer.

Change-Id: Ic132569d84d6e00eeed4ea49f2467e09af4b0756
Reviewed-on: https://go-review.googlesource.com/c/go/+/452915
Run-TryBot: Tim King <taking@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

doc/go1.20.html

index c61d308088533347edc4f39bba4288ea8f416246..5fadb3e3aa344a04d4fe7829a82a333663370b4b 100644 (file)
@@ -186,12 +186,6 @@ Do not send CLs removing the interior tags from such phrases.
 
 <h3 id="vet">Vet</h3>
 
-<h4 id="vet-timeformat">New diagnostic for incorrect time formats</h4>
-
-<p><!-- https://go.dev/issue/48801, CL 354010 -->
-  TODO: <a href="https://go.dev/issue/48801">https://go.dev/issue/48801</a>: check for time formats with 2006-02-01
-</p>
-
 <h4 id="vet-loopclosure">Improved detection of loop variable capture by nested functions</h4>
 
 <p><!-- CL 447256 --><!-- https://go.dev/issue/55972: extend the loopclosure analysis to parallel subtests -->
@@ -208,6 +202,17 @@ Do not send CLs removing the interior tags from such phrases.
   inspects the last statements within if, switch, and select statements.
 </p>
 
+<h4 id="vet-timeformat">New diagnostic for incorrect time formats</h4>
+
+<p><!-- CL 354010 --><!-- https://go.dev/issue/48801: check for time formats with 2006-02-01 -->
+  The vet tool now reports use of the time format 2006-02-01 (yyyy-dd-mm)
+  with <a href="/pkg/time/#Time.Format"><code>Time.Format</code></a> and
+  <a href="/pkg/time/#Parse"><code>time.Parse</code></a>.
+  This format does not appear in common date standards, but is frequently
+  used by mistake when attempting to use the ISO 8601 date format
+  (yyyy-mm-dd).
+</p>
+
 <h2 id="runtime">Runtime</h2>
 
 <p>