2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-14 18:12:57 +00:00
cointop/pkg/table/sort.go
2020-11-18 20:37:40 -08:00

24 lines
348 B
Go

package table
// SortOrder int
type SortOrder int
// SortFn sort function
type SortFn func(interface{}, interface{}) bool
const (
// SortNone sort none
SortNone SortOrder = iota
// SortAsc sort ascendinge
SortAsc
// SortDesc sort descending
SortDesc
)
// SortBy sort by
type SortBy struct {
index int
order SortOrder
sortFn SortFn
}