2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-18 15:25:31 +00:00
cointop/pkg/table/sort.go

24 lines
348 B
Go
Raw Normal View History

2018-03-29 22:02:24 +00:00
package table
// SortOrder int
2018-03-29 22:02:24 +00:00
type SortOrder int
// SortFn sort function
2018-03-29 22:02:24 +00:00
type SortFn func(interface{}, interface{}) bool
const (
// SortNone sort none
2018-03-29 22:02:24 +00:00
SortNone SortOrder = iota
// SortAsc sort ascendinge
2018-03-29 22:02:24 +00:00
SortAsc
// SortDesc sort descending
2018-03-29 22:02:24 +00:00
SortDesc
)
// SortBy sort by
2018-03-29 22:02:24 +00:00
type SortBy struct {
index int
order SortOrder
sortFn SortFn
}