sorter

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Slice

func Slice(s interface{}, fn func(int) Cmp)

rewrite this BS after Go1.18 in February

Types

type Chain

type Chain []Cmp

func (Chain) Less

func (c Chain) Less(other Cmp) bool

type Chain2

type Chain2 []Cmp

func (Chain2) Less

func (c Chain2) Less(other Cmp) bool

type Cmp

type Cmp interface {
	Less(o Cmp) bool
}

type FloatAsc

type FloatAsc float32

func (FloatAsc) Less

func (f FloatAsc) Less(o Cmp) bool

type FloatDesc

type FloatDesc float32

func (FloatDesc) Less

func (f FloatDesc) Less(o Cmp) bool

type IntAsc

type IntAsc int

func (IntAsc) Less

func (ia IntAsc) Less(o Cmp) bool

type IntDesc

type IntDesc int

func (IntDesc) Less

func (ia IntDesc) Less(o Cmp) bool

type StrAsc

type StrAsc string

func (StrAsc) Less

func (s StrAsc) Less(o Cmp) bool

type StrDesc

type StrDesc string

func (StrDesc) Less

func (s StrDesc) Less(o Cmp) bool

Jump to

Keyboard shortcuts

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