udwSort

package
v0.0.0-...-f254aa5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: MIT Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntLessCallbackSort

func IntLessCallbackSort(Data []int, LessFunc func(a int, b int) bool)

func InterfaceCallbackSort

func InterfaceCallbackSort(objList interface{}, lessFn interface{})

func InterfaceCallbackSortWithIndexLess

func InterfaceCallbackSortWithIndexLess(objList interface{}, lessFn func(a int, b int) bool)

func InterfaceRevert

func InterfaceRevert(objList interface{})

func KeysOfMapSortByKey

func KeysOfMapSortByKey(keyOfMapMustBeString interface{}) (keyList []string)

func KeysOfMapSortByValue

func KeysOfMapSortByValue(m map[string]int) (keyList []string)

func KeysOfMapSortByValueFloat64

func KeysOfMapSortByValueFloat64(m map[string]float64) (keyList []string)

func ReverseStringList

func ReverseStringList(sList []string)

func ReverseStringSort

func ReverseStringSort(sList []string)

func SortInt

func SortInt(data []int)

func SortString

func SortString(data []string)

Types

type IntLessCallbackSortT

type IntLessCallbackSortT struct {
	Data     []int
	LessFunc func(a int, b int) bool
}

func (*IntLessCallbackSortT) Len

func (s *IntLessCallbackSortT) Len() int

func (*IntLessCallbackSortT) Less

func (s *IntLessCallbackSortT) Less(i, j int) bool

func (*IntLessCallbackSortT) Sort

func (s *IntLessCallbackSortT) Sort()

func (*IntLessCallbackSortT) Swap

func (s *IntLessCallbackSortT) Swap(i, j int)

type ReverseStringSlice

type ReverseStringSlice []string

func (ReverseStringSlice) Len

func (p ReverseStringSlice) Len() int

func (ReverseStringSlice) Less

func (p ReverseStringSlice) Less(i, j int) bool

func (ReverseStringSlice) Swap

func (p ReverseStringSlice) Swap(i, j int)

type StringIntPair

type StringIntPair struct {
	String string
	Int    int
}

type StringIntPairSortedByIntDesc

type StringIntPairSortedByIntDesc []StringIntPair

func (StringIntPairSortedByIntDesc) Len

func (StringIntPairSortedByIntDesc) Less

func (StringIntPairSortedByIntDesc) Swap

func (l StringIntPairSortedByIntDesc) Swap(i int, j int)

Jump to

Keyboard shortcuts

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