compare

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SortOrder

type SortOrder int
const (
	Ascending  SortOrder = 1
	Descending SortOrder = -1
)

type Sorter

type Sorter[T any] struct {
	// contains filtered or unexported fields
}

func NewSorter

func NewSorter[T any](comparatorFactory func(string) func(T, T) int) *Sorter[T]

func (Sorter[T]) Sort

func (s Sorter[T]) Sort(records []T, orderBy string) []T

Jump to

Keyboard shortcuts

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