aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorQuentin Quaadgras <quentin@splizard.com>2025-11-19 21:18:39 +0000
committerAlan Donovan <adonovan@google.com>2025-11-25 09:18:42 -0800
commite8fdfeb72b0468b645f256bcaf46570f866a54fd (patch)
treec326fe70557a13111b317dc102c261a36f95e168 /api
parent12d437c09a2ea871333547c8ac3ea536f433891b (diff)
downloadgo-e8fdfeb72b0468b645f256bcaf46570f866a54fd.tar.xz
reflect: add iterator equivalents for NumField, NumIn, NumOut and NumMethod
The new methods are Type.Fields, Type.Methods, Type.Ins, Type.Outs, Value.Fields and Value.Methods. These methods have been introduced into the reflect package (as well as tests) replacing three-clause for loops where possible. Fixes #66631 Change-Id: Iab346e52c0eadd7817afae96d9ef73a35db65fd2 GitHub-Last-Rev: 8768ef71b9fd74536094cb1072c7075dc732cd5c GitHub-Pull-Request: golang/go#75646 Reviewed-on: https://go-review.googlesource.com/c/go/+/707356 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'api')
-rw-r--r--api/next/66631.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/api/next/66631.txt b/api/next/66631.txt
new file mode 100644
index 0000000000..ffc068bde6
--- /dev/null
+++ b/api/next/66631.txt
@@ -0,0 +1,6 @@
+pkg reflect, type Type interface, Fields() iter.Seq[StructField] #66631
+pkg reflect, type Type interface, Methods() iter.Seq[Method] #66631
+pkg reflect, type Type interface, Ins() iter.Seq[Type] #66631
+pkg reflect, type Type interface, Outs() iter.Seq[Type] #66631
+pkg reflect, method (Value) Fields() iter.Seq2[StructField, Value] #66631
+pkg reflect, method (Value) Methods() iter.Seq2[Method, Value] #66631