From: Jes Cok Date: Wed, 3 Apr 2024 04:18:14 +0000 (+0800) Subject: slices: update doc for Repeat X-Git-Tag: go1.23rc1~698 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4b2db7f60d808dc9e135af86bcd4a39ae63b1fc7;p=gostls13.git 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 Reviewed-by: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov --- diff --git a/src/slices/slices.go b/src/slices/slices.go index a5734a17bf..d96dd8d37c 100644 --- a/src/slices/slices.go +++ b/src/slices/slices.go @@ -477,7 +477,7 @@ func Concat[S ~[]E, E any](slices ...S) S { } // Repeat returns a new slice that repeats the provided slice the given number of times. -// The result has length and capacity len(x) * count. +// The result has length and capacity (len(x) * count). // The result is never nil. // Repeat panics if count is negative or if the result of (len(x) * count) // overflows.