Skip to content

Commit 3725364

Browse files
callthingsoffpull[bot]
authored andcommitted
slices: update doc for Repeat
To use (len(x) * count) consistently. Change-Id: I45fa4383de7e05846152a8090ea5c04bc72a1727 Reviewed-on: https://go-review.googlesource.com/c/go/+/575955 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
1 parent 9f67a84 commit 3725364

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/slices/slices.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ func Concat[S ~[]E, E any](slices ...S) S {
477477
}
478478

479479
// Repeat returns a new slice that repeats the provided slice the given number of times.
480-
// The result has length and capacity len(x) * count.
480+
// The result has length and capacity (len(x) * count).
481481
// The result is never nil.
482482
// Repeat panics if count is negative or if the result of (len(x) * count)
483483
// overflows.

0 commit comments

Comments
 (0)