mirror of https://github.com/miguelmota/cointop
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
348 B
Go
24 lines
348 B
Go
7 years ago
|
package table
|
||
|
|
||
7 years ago
|
// SortOrder int
|
||
7 years ago
|
type SortOrder int
|
||
7 years ago
|
|
||
|
// SortFn sort function
|
||
7 years ago
|
type SortFn func(interface{}, interface{}) bool
|
||
|
|
||
|
const (
|
||
7 years ago
|
// SortNone sort none
|
||
7 years ago
|
SortNone SortOrder = iota
|
||
7 years ago
|
// SortAsc sort ascendinge
|
||
7 years ago
|
SortAsc
|
||
7 years ago
|
// SortDesc sort descending
|
||
7 years ago
|
SortDesc
|
||
|
)
|
||
|
|
||
7 years ago
|
// SortBy sort by
|
||
7 years ago
|
type SortBy struct {
|
||
|
index int
|
||
|
order SortOrder
|
||
|
sortFn SortFn
|
||
|
}
|