sort

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SortedList

type SortedList struct {
	List []map[string]interface{} // 数据本体

	ColumnType string // 要排序的类型
	// contains filtered or unexported fields
}

SortedList 排序用数组

func (*SortedList) DecodeList

func (sor *SortedList) DecodeList(data interface{}) error

DecodeList 将列表赋值出去, 需要传递指针类型参数

func (*SortedList) GroupSorted

func (sor *SortedList) GroupSorted(group string, column string, orderDesc bool) *SortedList

func (*SortedList) Len

func (sor *SortedList) Len() int

Len 排序需要实现的接口

func (*SortedList) Less

func (sor *SortedList) Less(i, j int) bool

Less 排序需要实现的接口

func (*SortedList) LoadData

func (sor *SortedList) LoadData(data interface{}) *SortedList

LoadData 加载数据

func (*SortedList) Sorted

func (sor *SortedList) Sorted(column string, orderDesc bool) *SortedList

Sorted 根据指定的字段和排序规则进行排序

func (*SortedList) Swap

func (sor *SortedList) Swap(i, j int)

Swap 排序需要实现的接口

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL