]> Cypherpunks repositories - gostls13.git/commitdiff
doc: mark range-over-func as documented
authorDmitri Shuralyov <dmitshur@golang.org>
Wed, 5 Jun 2024 19:21:25 +0000 (15:21 -0400)
committerGopher Robot <gobot@golang.org>
Wed, 5 Jun 2024 19:56:43 +0000 (19:56 +0000)
The language change for the accepted range-over-func proposal #61405
was documented in CL 590616. Remove the corresponding 'TODO' entry.

Also improve formatting slightly, and switch to preferred relative
links. They'll work better in the long term and in more contexts.

While here, also simplify the suggested line to preview release notes
locally: setting the -content='' flag explicitly is no longer required
as of CL 589936.

For #65614.

Change-Id: I6cee951b9ede33900bca48c9f709e3b2c5e87337
Reviewed-on: https://go-review.googlesource.com/c/go/+/590756
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
doc/README.md
doc/next/2-language.md
doc/next/9-todo.md

index bfd3c1e6a1b31c2a5d3a27aca85faede114026c0..b0d99456da62453934cce14f0ae65dcf0f32cba8 100644 (file)
@@ -48,7 +48,7 @@ Use the following forms in your markdown:
 To preview `next` content in merged form using a local instance of the website, run:
 
 ```
-go run golang.org/x/website/cmd/golangorg@latest -content='' -goroot=..
+go run golang.org/x/website/cmd/golangorg@latest -goroot=..
 ```
 
 Then open http://localhost:6060/doc/next. Refresh the page to see your latest edits.
index db5d83a73e42cb905196dc69fe469d7cc974d0be..9bd0bde0833510f0ddc31eedcc63cea3e997b6b4 100644 (file)
@@ -1,16 +1,16 @@
 ## Changes to the language {#language}
 
 <!-- go.dev/issue/61405, CL 557835, CL 584596 -->
-Go 1.23 makes the (Go 1.22) ["range-over-func" experiment](https://tip.golang.org/wiki/RangefuncExperiment) a part of the language.
+Go 1.23 makes the (Go 1.22) ["range-over-func" experiment](/wiki/RangefuncExperiment) a part of the language.
 The "range" clause in a "for-range" loop now accepts iterator functions of the following types
 
-        func(func() bool)
-        func(func(K) bool)
-        func(func(K, V) bool)
+       func(func() bool)
+       func(func(K) bool)
+       func(func(K, V) bool)
 
- as range expressions.
- Calls of the iterator argument function produce the iteration values for the "for-range" loop.
- For details see the [language spec](https://tip.golang.org/ref/spec#For_statements).
+as range expressions.
+Calls of the iterator argument function produce the iteration values for the "for-range" loop.
+For details see the [language spec](/ref/spec#For_statements).
 
 <!-- go.dev/issue/46477, CL 566856, CL 586955, CL 586956 -->
 Go 1.23 includes preview support for [generic type aliases](/issue/46477).
index e253aa736a0e5e5cd255fcf17fb10622df6ae94f..eefdbe293ce566ad75b931cd394481e1bb1de5d7 100644 (file)
@@ -1,8 +1,5 @@
 <!-- These items need to be completed and moved to an appropriate location in the release notes. -->
 
-<!-- go.dev/issue/61405, CL 557835, CL 584596 -->
-TODO: Document that range-over-func is enabled (and that GOEXPERIMENT=rangefunc is relevant) in Go 1.23. This note should be moved to an appropriate location in the release notes.
-
 <!-- go.dev/issue/60905, CL 559555 -->
 TODO: The new `GOARM64` environment variable needs to be documented. This note should be moved to an appropriate location in the release notes.