sort

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Multi

type Multi[T any] struct {
	LessFuncs []func(p1, p2 *T) bool
	// contains filtered or unexported fields
}

Multi is used to sort a slice of T using the list of LessFuncs, so you can order a table by different columns

func (*Multi[T]) Len

func (ms *Multi[T]) Len() int

func (*Multi[T]) Less

func (ms *Multi[T]) Less(i, j int) bool

func (*Multi[T]) Sort

func (ms *Multi[T]) Sort(changes []T)

func (*Multi[T]) Swap

func (ms *Multi[T]) Swap(i, j int)

Jump to

Keyboard shortcuts

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