mirror of
https://github.com/miguelmota/cointop
synced 2024-11-14 18:12:57 +00:00
24 lines
348 B
Go
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
|
|
}
|