sort

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type By

type By interface {
	Equal(a, b record.Record) bool
	Less(a, b record.Record) bool
	String() string
}

func ByInt64IndexAsc

func ByInt64IndexAsc(index Int64IndexCalculation) By

ByInt64IndexAsc create sorting by int64 index in ASC direction

func ByInt64IndexDesc

func ByInt64IndexDesc(index Int64IndexCalculation) By

ByInt64IndexAsc create sorting by int64 index in DESC direction

func ByStringAsc

func ByStringAsc(getter *record.StringGetter) By

func ByStringDesc

func ByStringDesc(getter *record.StringGetter) By

type Int64IndexCalculation

type Int64IndexCalculation interface {
	CalcIndex(item record.Record) int64
}

Int64IndexCalculation is a special case for sorting by comparing int64 values

Jump to

Keyboard shortcuts

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