go/src/bytes
Ian Lance Taylor 8b0583a054 [release-branch.go1.18] bytes: restore old Trim/TrimLeft behavior for nil
Keep returning nil for the cases where we historically returned nil,
even though this is slightly different for TrimLeft and TrimRight.

For #51793
Fixes #51796

Change-Id: Ifbdfc6b09d52b8e063cfe6341019f9b2eb8b70e9
Reviewed-on: https://go-review.googlesource.com/c/go/+/393876
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit 32fdad19a2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/396294
Reviewed-by: Austin Clements <austin@google.com>
2022-03-30 16:42:29 +00:00
..
boundary_test.go bytes: test for page boundary crosses on sep of Index 2021-11-02 17:31:50 +00:00
buffer.go bytes: correct tense in comment 2021-03-15 17:37:09 +00:00
buffer_test.go bufio, bytes, strings: handle negative runes in WriteRune 2021-02-24 04:01:25 +00:00
bytes.go [release-branch.go1.18] bytes: restore old Trim/TrimLeft behavior for nil 2022-03-30 16:42:29 +00:00
bytes_test.go [release-branch.go1.18] bytes: restore old Trim/TrimLeft behavior for nil 2022-03-30 16:42:29 +00:00
compare_test.go
example_test.go bytes: add example with (*Buffer).Cap, (*Buffer).Read, (*Buffer).ReadByte 2021-11-05 21:26:54 +00:00
export_test.go
reader.go
reader_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00