github.com/patrickmn/sortutil
Sortutil is a Go library which lets you sort a slice without implementing a sort.Interface, and in different orderings: ascending, descending, or case-insensitive ascending or descending (for slices of strings.) Additionally, Sortutil lets you sort a slice of a custom struct by a given struct field or index--for example, you can sort a []MyStruct by the structs' "Name" fields, or a [][]int by the second index of each nested slice, similar to using sorted(key=operator.itemgetter/attrgetter) in Python.
Ecosystem
proxy.golang.org
proxy.golang.org
Latest Release
almost 14 years ago
v0.0.0-20120526081524-abeda66eb583
almost 14 years ago
Versions
1
1
Dependent Packages
8
8
Dependent Repos
13
13
Loading...
Readme
Loading...
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/patrickmn/sortutil
spec |
| License | MIT |
| Namespace | github.com/patrickmn |
| First Release | almost 14 years ago |
| Last Synced | 16 days ago |
Rankings on proxy.golang.org
Overall
Top 3.2%
Dependent packages
Top 1.9%
Dependent repos
Top 1.5%
Forks
Top 5.4%
Docker downloads
Top 1.8%