-
Notifications
You must be signed in to change notification settings - Fork 301
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
internal/colltab: improve numeric sorting #50
base: master
Are you sure you want to change the base?
Conversation
This PR (HEAD: 4893f34) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/text/+/583257. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
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/583257. |
Message from Timmy Welch: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Ian Lance Taylor: Patch Set 4: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Go LUCI: Patch Set 4: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-11-06T17:42:57Z","revision":"229ac8376b6113019100667870a06bcd59d46950"} Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Ian Lance Taylor: Patch Set 4: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Go LUCI: Patch Set 4: This CL has failed the run. Reason: Tryjob golang/try/x_text-go1.22-darwin-amd64_14 has failed with summary (view all results):
Build or test failure, click here for results. To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Go LUCI: Patch Set 4: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Ian Lance Taylor: Patch Set 5: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Go LUCI: Patch Set 5: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-11-06T20:17:25Z","revision":"a3bf9fe50f07b0c64f238948a4e138a0137c1c62"} Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Ian Lance Taylor: Patch Set 5: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Go LUCI: Patch Set 5: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Go LUCI: Patch Set 5: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Ian Lance Taylor: Patch Set 5: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Elem.Primary() == 0 has odd ordering properties, starting at 1 allows 0 to consistently be ordered before other numbers when non-numeric text follows a 0 Also fixes an issue comparing numbers > 269 characters with numbers < 270 characters Fixes golang/go#25554
Makes numeric sorting deterministic. Particularly useful for approximating how an OS file manager will sort files.
This PR (HEAD: ce407f2) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/text/+/583257. Important tips:
|
Message from Timmy Welch: Patch Set 6: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Ian Lance Taylor: Patch Set 6: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Timmy Welch: Patch Set 6: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Message from Ian Lance Taylor: Patch Set 6: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/583257. |
Avoid using Elem.Primary() == 0 in numeric.go as it has odd ordering
properties, starting at 1 allows 0 to consistently be ordered before
other numbers when non-numeric text follows a 0
Also fixes an issue comparing numbers > 269 characters with
numbers < 270 characters
Sort numbers with leading zeros, as it makes numeric sorting
deterministic. Particularly useful for approximating how an OS file
manager will sort files.
Fixes golang/go#25554