Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bytes: Trim returns empty slice instead of nil in 1.18 [1.18 backport] #51796

Closed
gopherbot opened this issue Mar 18, 2022 · 3 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@ianlancetaylor requested issue #51793 to be considered for backport to the next 1.18 minor release.

@gopherbot Please open backport issue for 1.18

Assuming we do go ahead and restore the old behavior, as I think we should, we need to backport the fix to 1.18 so that we are consistent across releases.

@gopherbot
Copy link
Author

Change https://go.dev/cl/396294 mentions this issue: [release-branch.go1.18] bytes: restore old Trim/TrimLeft behavior for nil

@heschi heschi added the CherryPickApproved Used during the release process for point releases label Mar 30, 2022
@heschi
Copy link
Contributor

heschi commented Mar 30, 2022

Approved; this is an unintended behavior change.

@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Mar 30, 2022
@gopherbot
Copy link
Author

Closed by merging 8b0583a to release-branch.go1.18.

gopherbot pushed a commit that referenced this issue Mar 30, 2022
… 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 32fdad1)
Reviewed-on: https://go-review.googlesource.com/c/go/+/396294
Reviewed-by: Austin Clements <austin@google.com>
@golang golang locked and limited conversation to collaborators Mar 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

2 participants