-
Notifications
You must be signed in to change notification settings - Fork 18k
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
strconv: use switch for '+'/'-' prefix handling #73185
Conversation
Replace if-else with a switch statement to handle leading '+' and '-' characters.
This PR (HEAD: 0c9d2ef) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/663257. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Message from Keith Randall: Patch Set 1: Auto-Submit+1 Code-Review+2 Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Message from Go LUCI: Patch Set 1: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-04-07T17:50:31Z","revision":"18b91a2dccdf1566840a70aafb1c84eeedfae9ba"} Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Message from Keith Randall: Patch Set 1: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Message from Keith Randall: Patch Set 1: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Message from Go LUCI: Patch Set 1: This CL has failed the run. Reason: Tryjob golang/try/gotip-windows-amd64 has failed with summary (view all results):
To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Message from Go LUCI: Patch Set 1: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Message from Keith Randall: Patch Set 2: Code-Review+2 Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Message from Go LUCI: Patch Set 2: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-04-07T19:08:09Z","revision":"86299c05e776a97a89dba28cbfe657f75a83408a"} Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Message from Keith Randall: Patch Set 2: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Message from Go LUCI: Patch Set 2: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Message from Go LUCI: Patch Set 2: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Message from Keith Randall: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/663257. |
Follow the approach used in strconv's readFloat, decimal.set, and Atoi, where leading '+' and '-' are handled using a switch for clarity and consistency. Change-Id: I41eff34ce90b5ac43fcdbc0bb88910d6d5fb4d39 GitHub-Last-Rev: 0c9d2ef GitHub-Pull-Request: #73185 Reviewed-on: https://go-review.googlesource.com/c/go/+/663257 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
This PR is being closed because golang.org/cl/663257 has been merged. |
Follow the approach used in strconv's readFloat, decimal.set, and Atoi,
where leading '+' and '-' are handled using a switch for clarity and
consistency.