-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pdata: add [Type]Slice.Sort(func) to sort slices (#3671)
* pdata: add TypeSlice.Sort(func) to sort slices Comparing two generated slices can be tedious when the slices are not ordered, and order does not matter for the test. This change adds a .Sort(func(i, j int) bool) method to generated [Type]Slice. This is similar to method StringMap.Sort(), but takes a less function because the order may differ by context, where the sort order of a map is obvious (by key). * fix: improve TypeSlice.Sort(less) signature * fix: resolve goimports CI check * chore: make genpdata
- Loading branch information
1 parent
4c92ef4
commit 6814536
Showing
8 changed files
with
258 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.