1
0
mirror of https://github.com/golang/go synced 2024-11-22 18:44:54 -07:00
go/src/bytes
go101 44b54b99c9 strings,bytes: improve Repeat panic messages
The Repeat("-", maxInt) call should produce

   panic: runtime error: makeslice: len out of range

instead of

   panic: strings: Repeat output length overflow

This PR is only for theory perfection.

Change-Id: If67d87b147d666fbbb7238656f2a0cb6cf1dbb5b
GitHub-Last-Rev: 29dc0cb9c9
GitHub-Pull-Request: golang/go#67068
Reviewed-on: https://go-review.googlesource.com/c/go/+/581936
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-05-03 12:58:37 +00:00
..
boundary_test.go
buffer_test.go bytes: skip TestNewBufferShallow if optimization is disabled 2024-04-26 13:31:36 +00:00
buffer.go
bytes_test.go strings,bytes: improve Repeat panic messages 2024-05-03 12:58:37 +00:00
bytes.go strings,bytes: improve Repeat panic messages 2024-05-03 12:58:37 +00:00
compare_test.go
example_test.go
export_test.go
reader_test.go
reader.go bytes: fix up godoc link errors 2024-04-30 19:45:36 +00:00