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

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