]> Cypherpunks repositories - gostls13.git/commitdiff
slices: update doc for Repeat
authorJes Cok <xigua67damn@gmail.com>
Wed, 3 Apr 2024 04:18:14 +0000 (12:18 +0800)
committerGopher Robot <gobot@golang.org>
Wed, 3 Apr 2024 22:46:15 +0000 (22:46 +0000)
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>
src/slices/slices.go

index a5734a17bf496bf6559382e6d3c3d32515529b55..d96dd8d37c4199c2ab15c6cf1641aa5566173a77 100644 (file)
@@ -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.