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.
cointop/pkg/table/sort.go

24 lines
348 B
Go

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