Skip to content

Commit e53d10d

Browse files
dmitshurgopherbot
authored andcommitted
doc: mark range-over-func as documented
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 <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
1 parent b658265 commit e53d10d

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

doc/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Use the following forms in your markdown:
4848
To preview `next` content in merged form using a local instance of the website, run:
4949

5050
```
51-
go run golang.org/x/website/cmd/golangorg@latest -content='' -goroot=..
51+
go run golang.org/x/website/cmd/golangorg@latest -goroot=..
5252
```
5353

5454
Then open http://localhost:6060/doc/next. Refresh the page to see your latest edits.

doc/next/2-language.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
## Changes to the language {#language}
22

33
<!-- go.dev/issue/61405, CL 557835, CL 584596 -->
4-
Go 1.23 makes the (Go 1.22) ["range-over-func" experiment](https://tip.golang.org/wiki/RangefuncExperiment) a part of the language.
4+
Go 1.23 makes the (Go 1.22) ["range-over-func" experiment](/wiki/RangefuncExperiment) a part of the language.
55
The "range" clause in a "for-range" loop now accepts iterator functions of the following types
66

7-
func(func() bool)
8-
func(func(K) bool)
9-
func(func(K, V) bool)
7+
func(func() bool)
8+
func(func(K) bool)
9+
func(func(K, V) bool)
1010

11-
as range expressions.
12-
Calls of the iterator argument function produce the iteration values for the "for-range" loop.
13-
For details see the [language spec](https://tip.golang.org/ref/spec#For_statements).
11+
as range expressions.
12+
Calls of the iterator argument function produce the iteration values for the "for-range" loop.
13+
For details see the [language spec](/ref/spec#For_statements).
1414

1515
<!-- go.dev/issue/46477, CL 566856, CL 586955, CL 586956 -->
1616
Go 1.23 includes preview support for [generic type aliases](/issue/46477).

doc/next/9-todo.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
<!-- These items need to be completed and moved to an appropriate location in the release notes. -->
22

3-
<!-- go.dev/issue/61405, CL 557835, CL 584596 -->
4-
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.
5-
63
<!-- go.dev/issue/60905, CL 559555 -->
74
TODO: The new `GOARM64` environment variable needs to be documented. This note should be moved to an appropriate location in the release notes.
85

0 commit comments

Comments
 (0)