]> Cypherpunks repositories - gostls13.git/commitdiff
doc: add release notes for new min/max built-ins
authorRobert Griesemer <gri@golang.org>
Thu, 25 May 2023 21:50:08 +0000 (14:50 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 25 May 2023 22:02:08 +0000 (22:02 +0000)
For #59488.

Change-Id: Iefabb06014767c5f633082a112a81e9ff5f09a30
Reviewed-on: https://go-review.googlesource.com/c/go/+/498397
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>

doc/go1.21.html

index c1cca12d22db5b71cf516a0903dbe3bd7c5271ca..040a12c682b20a4ca625d921a01b5e670562f4ae 100644 (file)
@@ -25,6 +25,15 @@ Do not send CLs removing the interior tags from such phrases.
 
 <h2 id="language">Changes to the language</h2>
 
+<!-- https://go.dev/issue/59488 -->
+<p>
+  Go 1.21 adds two new built-ins to the language:
+  the new functions <code>min</code> and <code>max</code> compute the
+  smallest (or largest, for <code>max</code>) value of a fixed number
+  of given arguments.
+  See the language spec for <a href="https://tip.golang.org/ref/spec#Min_and_max">details</a>.
+</p>
+
 <p><!-- https://go.dev/issue/56986 -->
   TODO: <a href="https://go.dev/issue/56986">https://go.dev/issue/56986</a>: extended backwards compatibility for Go
 </p>