You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_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>
Copy file name to clipboardExpand all lines: _content/doc/go1.26.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -566,10 +566,19 @@ and an error indicating which signal was received.
566
566
567
567
#### [`reflect`](/pkg/reflect/)
568
568
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).
573
582
574
583
#### [`runtime/metrics`](/pkg/runtime/metrics/)
575
584
@@ -605,7 +614,7 @@ For example, in a test named `TestArtifacts`,
605
614
606
615
The new [`SetGlobalRandom`](/pkg/testing/cryptotest#SetGlobalRandom) function configures a global, deterministic
607
616
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
0 commit comments