Documentation
¶
Index ¶
- Variables
- func ByName(a, b string) bool
- func ByNameSmart(a, b string) bool
- func Reverse[TElem any, TSort ~func(a, b TElem) bool](sorter TSort) TSort
- func Sort[TElem any, TSort ~func(a, b TElem) bool](arr []TElem, sorter TSort)
- func SortBy[TElem any, TBy any, TSort ~func(a, b TBy) bool](arr []TElem, sorter TSort, extractor func(obj TElem) TBy)
- type NameSorter
- type NameValuePair
- type NameValueSorter
- type Sorter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NVValueSorter = Reverse(ValueSorterEx(Reverse(ByName))) NVNameSorter = ValueNilSorter(ByName) NVSmartSorter = ValueNilSorter(ByNameSmart) )
Functions ¶
func ByNameSmart ¶
Types ¶
type NameSorter ¶
func ByContextual ¶
func ByContextual() NameSorter
func ByContextualEx ¶
func ByContextualEx(fallbackSort NameSorter) NameSorter
func ByDate ¶
func ByDate(fallbackSort NameSorter) NameSorter
func ByDateWithContextual ¶
func ByDateWithContextual() NameSorter
type NameValuePair ¶
type NameValueSorter ¶
type NameValueSorter Sorter[NameValuePair]
func ValueNilSorter ¶
func ValueNilSorter(sorter NameSorter) NameValueSorter
func ValueSorterEx ¶
func ValueSorterEx(fallback NameSorter) NameValueSorter
Click to show internal directories.
Click to hide internal directories.