aboutsummaryrefslogtreecommitdiff
path: root/doc/next
diff options
context:
space:
mode:
authorqiulaidongfeng <2645477756@qq.com>2024-05-07 22:53:35 +0000
committerGopher Robot <gobot@golang.org>2024-05-09 11:54:18 +0000
commit524a7746349a6ce6d4af76a1840366daac46aa12 (patch)
treefefabea24bde9eaf86a8d0062c0c22940e2ac292 /doc/next
parent49eedfb4d07ab6c0d62041ba722dfe81e73d92ce (diff)
downloadgo-524a7746349a6ce6d4af76a1840366daac46aa12.tar.gz
go-524a7746349a6ce6d4af76a1840366daac46aa12.zip
reflect: add iterative related methods
Fixes #66056 Change-Id: I1e24636e43e68cd57576c39b014e0826fb6c322c GitHub-Last-Rev: 319ad8ea7cd5326d23f9fddb9607924326aaf927 GitHub-Pull-Request: golang/go#66824 Reviewed-on: https://go-review.googlesource.com/c/go/+/578815 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'doc/next')
-rw-r--r--doc/next/6-stdlib/99-minor/reflect/66056.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/next/6-stdlib/99-minor/reflect/66056.md b/doc/next/6-stdlib/99-minor/reflect/66056.md
new file mode 100644
index 0000000000..b5f39349df
--- /dev/null
+++ b/doc/next/6-stdlib/99-minor/reflect/66056.md
@@ -0,0 +1,4 @@
+The new methods [Value.Seq] and [Value.Seq2] return sequences that iterate over the value
+as though it were used in a for/range loop.
+The new methods [Type.CanSeq] and [Type.CanSeq2] report whether calling
+[Value.Seq] and [Value.Seq2], respectively, will succeed without panicking.