aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJes Cok <xigua67damn@gmail.com>2024-05-21 01:44:41 +0800
committerGopher Robot <gobot@golang.org>2024-05-22 13:40:11 +0000
commitbb2b73635f391def286b3adc4eae2e2bb4a4ade0 (patch)
treef4f138fc88f501ed3d92dcaad822076b3db038b3 /src
parentcd41d7178587428f99330800ecb0cc1dd2608693 (diff)
downloadgo-bb2b73635f391def286b3adc4eae2e2bb4a4ade0.tar.xz
reflect: add line breaks for long sentences
Change-Id: Id63ede5d50a8b287bc0b96382f9f3ee6c2e0b834 Reviewed-on: https://go-review.googlesource.com/c/go/+/586856 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src')
-rw-r--r--src/reflect/iter.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/reflect/iter.go b/src/reflect/iter.go
index 7d01a1bdbb..36472013cb 100644
--- a/src/reflect/iter.go
+++ b/src/reflect/iter.go
@@ -6,7 +6,9 @@ package reflect
import "iter"
-func rangeNum[T int8 | int16 | int32 | int64 | int | uint8 | uint16 | uint32 | uint64 | uint | uintptr, N int64 | uint64](v N) iter.Seq[Value] {
+func rangeNum[T int8 | int16 | int32 | int64 | int |
+ uint8 | uint16 | uint32 | uint64 | uint |
+ uintptr, N int64 | uint64](v N) iter.Seq[Value] {
return func(yield func(v Value) bool) {
// cannot use range T(v) because no core type.
for i := T(0); i < T(v); i++ {
@@ -21,7 +23,8 @@ func rangeNum[T int8 | int16 | int32 | int64 | int | uint8 | uint16 | uint32 | u
// If v's kind is Func, it must be a function that has no results and
// that takes a single argument of type func(T) bool for some type T.
// If v's kind is Pointer, the pointer element type must have kind Array.
-// Otherwise v's kind must be Int, Int8, Int16, Int32, Int64, Uint, Uint8, Uint16, Uint32, Uint64, Uintptr,
+// Otherwise v's kind must be Int, Int8, Int16, Int32, Int64,
+// Uint, Uint8, Uint16, Uint32, Uint64, Uintptr,
// Array, Chan, Map, Slice, or String.
func (v Value) Seq() iter.Seq[Value] {
if canRangeFunc(v.typ()) {