compare

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 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 Compare

type Compare[T any] func(t1, t2 T) Order

func Asc

func Asc[T any](cmp Compare[T]) Compare[T]

func Combine

func Combine[T any](cmp ...Compare[T]) Compare[T]

func Desc

func Desc[T any](cmp Compare[T]) Compare[T]

type Order

type Order int
const (
	Smaller Order = iota
	Equal
	Greater
)

func Ordered

func Ordered[T constraints.Ordered](t1, t2 T) Order

func Time

func Time(t1, t2 time.Time) Order

Jump to

Keyboard shortcuts

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