mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-07-09 21:58:42 +02:00
07c8adaf76
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
10 lines
368 B
Go
10 lines
368 B
Go
package cmp
|
|
|
|
import "cmp"
|
|
|
|
// Cmp compares two ordered values and returns the result as an Ordering value.
|
|
func Cmp[T cmp.Ordered](x, y T) Ordering { return Ordering(cmp.Compare(x, y)) }
|
|
|
|
// Reverse compares two ordered values and returns the inverse of Cmp as an Ordering.
|
|
func Reverse[T cmp.Ordered](x, y T) Ordering { return Ordering(cmp.Compare(x, y)).Reverse() }
|