sort

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package sort provides sorting of cloned slice elements

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Asc added in v0.0.11

func Asc[T cmp.Ordered, TS ~[]T](elements TS) TS

Asc sorts orderable elements ascending

func By

func By[T any, O cmp.Ordered, TS ~[]T](elements TS, orderConverner func(T) O) TS

By sorts cloned elements slice in ascending order, using the orderConverner function to retrieve a value of type Ordered.

func Desc added in v0.0.11

func Desc[T cmp.Ordered, TS ~[]T](elements TS) TS

Desc sorts orderable elements descending

func DescBy added in v0.0.11

func DescBy[T any, O cmp.Ordered, TS ~[]T](elements TS, orderConverner func(T) O) TS

DescBy sorts cloned elements slice in descending order, using the orderConverner function to retrieve a value of type Ordered.

Types

This section is empty.

Jump to

Keyboard shortcuts

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