import "go.chromium.org/luci/common/data/sortby"
Package sortby provides a succinct way to generate correctly-behaved Less functions for use with the stdlib 'sort' package.
Chain is a list of LessFns, each of which sorts a single aspect of your object. Nil LessFns will be ignored.
Use is a sort-compatible LessFn that actually executes the full chain of comparisons.
LessFn is the type of the function which compares element i with element j of a given slice. Unlike the stdlib sort interpretation of this function, a LessFn in sortby should only compare a single field in your datastructure's elements. Multiple LessFns can be composed with Chain to create a composite Less implementation to pass to sort.
Package sortby is imported by 11 packages. Updated 2021-01-25. Refresh now. Tools for package owners.