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

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
}