Skip to content

Commit 8ead859

Browse files
cherrymuigopherbot
authored andcommitted
_content/doc/go1.26: reword release notes of new reflect iterators
We don't include the package name on types as it is already the "reflect" section. Mention the methods explicitly. For golang/go#75005. Change-Id: Ia8e31cd1982f9449c9304111cc6c89827b49cd24 Reviewed-on: https://go-review.googlesource.com/c/website/+/729560 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: David Chase <drchase@google.com>
1 parent b2e7f82 commit 8ead859

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

_content/doc/go1.26.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -566,10 +566,19 @@ and an error indicating which signal was received.
566566

567567
#### [`reflect`](/pkg/reflect/)
568568

569-
[`reflect.Type`](/pkg/reflect#Type) includes new methods that return iterators for a type's fields, methods, inputs and outputs.
570-
Similarly, [`reflect.Value`](/pkg/reflect#Value) includes two new methods that return iterators over a value's fields or methods,
571-
each element being a pair of the value ([`reflect.Value`](/pkg/reflect#Value)) and its type information ([`reflect.StructField`](/pkg/reflect#StructField) or
572-
[`reflect.Method`](/pkg/reflect#Method)).
569+
The new methods [`Type.Fields`](/pkg/reflect#Type.Fields),
570+
[`Type.Methods`](/pkg/reflect#Type.Methods),
571+
[`Type.Ins`](/pkg/reflect#Type.Ins)
572+
and [`Type.Outs`](/pkg/reflect#Type.Outs)
573+
return iterators for a type's fields (for a struct type), methods,
574+
inputs and outputs parameters (for a function type), respectively.
575+
576+
Similarly, the new methods [`Value.Fields`](/pkg/reflect#Value.Fields)
577+
and [`Value.Methods`](/pkg/reflect#Value.Methods) return iterators over
578+
a value's fields or methods, respectively.
579+
Each iteration yields the type information ([`StructField`](/pkg/reflect#StructField) or
580+
[`Method`](/pkg/reflect#Method)) of a field or method,
581+
along with the field or method [`Value`](/pkg/reflect#Value).
573582

574583
#### [`runtime/metrics`](/pkg/runtime/metrics/)
575584

@@ -605,7 +614,7 @@ For example, in a test named `TestArtifacts`,
605614

606615
The new [`SetGlobalRandom`](/pkg/testing/cryptotest#SetGlobalRandom) function configures a global, deterministic
607616
cryptographic randomness source for the duration of the test. It affects
608-
crypto/rand, and all implicit sources of cryptographic randomness in the
617+
`crypto/rand`, and all implicit sources of cryptographic randomness in the
609618
`crypto/...` packages.
610619

611620
#### [`time`](/pkg/time/)

0 commit comments

Comments
 (0)